: : Tom Fury
Den enda dokumentationen över Tommies liv

Hur äter du din balle?

Category: , By Tom Fury

Bra jobbat! :D


23 år!

Category: By Tom Fury
Idag så har jag levt i 23 år. Tack alla som har kommit ihåg dagen och gratulerat mig! Mycket uppskattat :).

Fira födelsedagen kommer jag göra i veckan med utgång på onsdag och fredag (2 x Rejf!); Zatox och Showtek, respektive dag. Det kommer bli ös så det bara smäller om det!

Sedan blir det väl att fira med familj och släkt, men det blir inte förräns om ett par veckor - det var riktigt svårt att hitta något datum där alla kunde.

Anyway. Tacopaj står på menyn ikväll och jag är grymt hungrig!


Candyman III: Day Of The Dead (1999)

Category: By Tom Fury
Från Mardi Gras i tvåan till Day of the Dead här. Början av denna tredje och sista del i Candyman-serien skriker ut b-film så starkt att man nästan känner marken själva. Att huvudrollsinnehavaren är grymt jävla snygg gör dock att det är helt okej. Stora bröst på snygg tjej = bra skit. Däremot helt kass som skådespelerska = dålig skit. Kollade upp vem hon var, och mycket riktigt var det som jag trodde: Hon var Playboy Playmate of the Month September 1995. Donna D'Errico. En riktig heting! Tyvärr kanske inte riktigt skådespelarmaterial...

Tony Todd (själva Candyman) är den enda som faktiskt är bra i den här filmen. Det måste ha varit en stor smärta för honom att behöva delta i denna rulle. Det nästan syns på honom att han inte riktigt vill göra den här filmen.

Det var en hel del naket i filmen, vilket i princip är filmens enda pluspoäng också.

Här ändrar de storyn om hur han dog också, vilket jag tycker är lite märkligt. Visserligen handlar det bara om smådetaljer, men ändå. I denna version är han fastbunden vid ett träd istället för att ligga på marken. Och bina är på honom där han hänger, men de nämner inget om att de smetade in honom med honung eller vax.

Modern från förra filmen är med även här. Fast i en halsuppsprättad version.

Förutom allt negativt jag nämnt innan så har Candyman III dessutom ett annat musiktema. Musiken som jag tyckte var så bra i de första två filmerna finns inte längre med här. Det var någon annan lirare som stod för musiken den här gången, och det hörs. Kul med förnyelse, men tråkigt att det nyare temat inte alls höll samma klass som föregående.

Det här är ett sista kapitel världen hade klarat sig bättre utan. Candyman I och Candyman II var två jäkligt bra filmer. Den här håller inte måttet över huvud taget. Trots den snygga huvudrollsinnehavaren så måste jag råda till att skippa den här skräprullen.


Candyman II: Farewell To The Flesh (1995)

Category: By Tom Fury
Candyman II inleds med att den tjocka fula och irriterande idioten från första filmen dödas av herr Godisman himself. Vilken bra start, jag gillade filmen redan då! Filmen har fått sin undertitel eftersom den utspelar sig under Mardi Gras festivalen i New Orleans. Carnival ~= Carne Vale = Farewell to the flesh eller Farewell to the meat på latin, tydligen.

Det är i denna andra del i trilogin som man får se var "Candyman" och "Sweets to the Sweet" härstammar från. Man får faktiskt se hela scenen där de efterblivna white trash idioterna dödar den stackars svarta killen. Den här gången känner man faktiskt sympati för Candyman. Trots att han slicar upp människor hej vilt (eller kanske tack vare?)

Musiken gör återigen samma sak för uppföljaren som den gjorde för den första filmen. Den höjer stämningen avsevärt och är faktiskt riktigt bra. Kanske inget oscarsvinnande soundtrack, men melodierna passar in perfekt och är lagom horror-trevliga.

Ett schysst grepp som används är att en radiopratare eller utannonserare eller nåt sånt ger mig som tittare hela tiden information och även fungerar lite som stämningssättare. Jag gillar det, för tonen och rösten som används för denna pratare passar jäkligt bra. Precis som Candymans röst. Jag kom att tänka på det nu, som jag också funderade på under första filmen. Candyman (Tony Todd) har en grym jävla mörk och elak röst. Kunde inte ha hittat bättre.

Utöver detta så får vi Mucho Blod. Dessutom, det faktum att Candyman läcker getingar när han river sönder sin egen kind höjer filmen några coolhetsfaktorer extra. Höj inte dina förväntningar till toppen nu bara, det är inte en superfilm, men nog tillräckligt bra för att underhålla och mätta gore-tarmen ett tag framöver.

Tyvärr känns den här inte lika häftig som sin föregångare. Dialogen är larvigare (förutom radioprataren) och skådespelarprestationerna känns krystade i en hel del scener. Det är ändå en film värd att se.


Candyman (1992)

Category: By Tom Fury
I denna klassiker från -92 får vi följa en kvinnlig universitetsstudent vid namn Helen Lyle. Hon skriver en uppsats om urban legends när hon får höra talas om berättelsen om Candyman. Candyman var en före detta slav, som blev någon form av konstnär eller nåt och hade en affär med en av sina klienters döttrar.

Som tack för att han satte på klientens dotter så fick han sin högra hand avskuren och genomgick en extreme makeover med en krok på handen istället. Till råga på allt så täcktes han i honung och kastades sedan in framför en shitload av bin där han blev ihjälstungen. När hon börjar undersöka stället där det sägs att Candyman härjar efter sin död, så möts hon av folk som alla är rädda för honom. Rädda för att det sägs att han skär upp folk från skrevet till huvudet. Och han kommer fram om man säger hans namn 5 gånger i rad framför en spegel. Ett gäng mord börjar ske, och vår lilla student börjar fundera på om myten egentligen sann? I sin idiotiska jakt på sanningen om legenden blir hon själv misstänkt för mord (funny enough...) och det hela urartar istället till en kamp för att rentvå sitt namn. Duuuh.

Graffiti depicting the Candyman. Coola grejer!

Jag gillar faktiskt filmen. Den har en massa gore, en hel del naket och egentligen en intressant story. Det enda som irriterar är att Virginia Madsen (som spelar huvudrollen; Helen Lyle) är så jävla korkad. Efter att ha fått så många varningar så ska hon bestämt fortsätta med sina efterforskningar om Candyman. Jag vet inte hur många det är som egentligen varnar henne, men idioten fortsätter såklart att gräva djupare och djupare. Typ hon gör alla survive-a-horror-movie-misstag som finns. Inte nåt rationellt över huvud taget.

Candyman i egen hög person. Nej, han såg inte så skräckinjagande ut i filmen. Men det gör inte så mycket, för han var en jäkel på att döda ändå!

Och sedan har vi scenen efter hennes första konfontation med Candyman. Då hon vaknar upp i en lägenhet, blodig, och hör en kvinna skrikandes. Efter att ha hittat ett avhugget hundhuvud tar hon självklart upp köttyxan som ligger på golvet. Smart drag. Bra att polisen kommer på dig med handen i syltburken efter att du cuttat en oskyldig kvinna med samma redskap. Denna idioti som hon påvisar genom i princip hela filmen känns lite irriterande, men förutom det så har jag inte så mycket annat att klaga på. Dessutom är musiken bra.

Se Candyman!


Gammal!

Category: By Tom Fury
Jag kom på en sak igår. På tisdag blir jag gammal. 23 år närmare bestämt. Vad kul! Det blir att fira på Otten på onsdag med Tiësto, Zatox, Albin och Stenis - hård elektronisk musik for the win!


Finally an update

Category: By Tom Fury
I know I haven't updated the blog in a while. That's because nothing interesting really has been happening. The last couple of days have been dedicated to write the master thesis report - and we're almost done with the theoretical part.

Regarding the implementation, I've got the Adapter + the XML schema left to do. I'm not sure how far Magnus has proceeded at the client part and the Excel reports, but I think it's going well. I know he's been able to produce an add-in package to Visual Studio which adds a meny item, from where you can communicate with our webservice to send the code metrics.

I'll get back to the blog as soon I've got some interesting news. Just wanted to assure you that I wasn't dead or slacking off ;-).


Märkligt fenomen

Category: By Tom Fury
Jag har upptäckt en ganska lustig sak. När jag haft min skrivbordslampa påslagen ett tag och sedan stänger av den samtidigt som min dator är påslagen, så dyker en liten pratbubbla upp i aktivitetsfältet som säger att "En kabel till lokal anslutning 3 är inte ansluten" eller något liknande. Om jag sätter på lampan igen så får jag samma meddelande återigen (båda gångerna försvinner det ganska omgående också). Ibland så kommer det tillbaka ännu en gång när jag slår på lampan igen, men sedan händer inget mer när jag sätter på eller stänger av lampan.

Antagligen något elektromagnetiskt fenomen med interferens och allt sådant roligt. Om någon kan ge mig en förklaring på varför det händer, så vore det ju ganska kul. Enda rimliga och rationella förklaringen jag ser nu är att både min dator och min lampa är besatta av onda andra. Nätverksandar.


Webbsite för Qlimax 2007 släppt

Category: , , , By Tom Fury
Min homeboy Marcus meddelade mig igår att Q-dance äntligen har släppt siten för Qlimax 2007. (Klicka på länken då och kika runt på siten!)

Lineup för i år:
  • Fausto
  • DJ Ghost
  • Brennan Heart
  • Showtek ft. DV8
  • Headhunterz
  • Zany & The Prophet
  • Technoboy
  • Neophyte
  • MC: Ruffian
Well, vad ska man säga? Alla snackar en massa dynga som "oooh det är så mycket nu-style och jag ska bojkotta hela Qlimax-skiten för jag tror jag är riktigt cool som bara stick to the old style hela tiden", eller att ovan nämnda DJ's suger med undantaget för Technoboy.

Fuck you säger jag. Jag skiter fullständigt i om det är nu-style, oldschool, whateverstyle (så länge det inte är jumpstyle - den skiten tål jag fan inte); jag är där för att festa och ha kul och stompa loss stenhårt. Inte för att klanka ner på ett gäng DJs som spelar. Ni negativa satar kan sluta bitcha och stanna hemma istället. Mer plats för mig att röra mig på dansgolvet då.


Well, låt oss tala lite om de som nu ska spela. Alla hardstyle-DJs nämnda ovan har jag redan sett minst en gång, och jag har inte blivit besviken någon gång hittils (nåja....Showtek med DV8 är ett kapitel för sig, återkommer till det). Låt oss börja från början.

Fausto vet jag inte ett skit om. Tydligen spelar han harddance/hardtrance (svårt att gissa när det är han som inleder....). Sägs att han ska ha väldigt mycket energi vid scenen och har tydligen fått ganska bra omdömen - så jag är openminded mot honom, även om musikstilen inte är den som ligger mig närmast om hjärtat.

Sedan kommer vi till DJ Ghost. När han spelar kommer jag insistera på att vi går och kollar runt på resten av arenan och kanske shoppar lite merchandise och memorabilia från eventet. Och äter lite. Allt för att slippa må så dåligt av herr Ghosts' jumpstyle. Jumpstyle är en musikgenre jag har grymt svårt att förstå tjusningen med. Det är inget fart i det, det finns inget klimax i låtarna, och basgången är obefintlig. Ytterligare så har vi ett sound på kicken som låter åt helvete ("boing-boing-boing-boing"). Det är bara fucked up. Så DJ Ghost kommer nog ignoreras ganska hårt från min sida.

Nästa på tur är Brennan Heart. Honom såg jag spela senast för 2 veckor sedan på Sweapsound (Blue Heaven) i Linköping. Inget dåligt framträdande tycker jag inte, som kanske framgår av blogginlägget. Därför tror jag heller inte att jag blir besviken på honom på Qlimax.

Showtek ft. DV8. Om de bara hade lämnat DV8 hemma så hade det här numret kännts så himla mycket bättre. Men nu får vi dras med MC I-don't-know-how-or-when-to-shut-the-hell-up DV8. Den här akten var ju med på Aqua-kryssningen (tillsammans med Zany) som var bland de roligare fester jag varit på (och bäst musikmässigt sett också!). Jag vet, i inlägget där skrev jag att DV8's MC'ande förhöjer stämningen men att det blev lite för mycket. Låt mig få revidera det uttalandet. Det blev alldeles för jävla mycket MC'ande. Tror inte heller Showtek kommer överraska speciellt mycket. De kommer väl bränna av sin Today Is Tomorrow där hälften av låtarna har fått sina 's' utbytta mot 'z' (jävla Z-virus!) och DV8 kommer gasta så mycket han orkar tills någon hoppar upp och syr igen käften på honom. Men ändå. När man är där och känner stämningen, hör hårdstilen flyta igenom öronen och ser den mäktiga ljusshowen så tror jag att jag kommer skita i att DV8 existerar, skita i att jag hört låtarna femhundratjugoelva gånger förut och bara njuta av att vara på Qlimax tillsammans med mitt crew och röja utav bara helvete.

Headhunterz. Ja, vad ska man säga? Man vet vad han kommer att spela? Yepp. Och det är han som står för temat till Qlimax 2007 (The Power Of The Mind) också, så anthemet kommer ju med all säkerhet spelas av honom. Plus alla hans andra låtar. Förhoppningsvis får vi se lite lekfullhet vid mixandet. När Headhunterz spelade på Otten så hade jag (som vanligt) jäkligt roligt, men spellistan var ju kanske inte världens mest nyanserade direkt. Men återigen, som jag sagt, det är nästan skit samma - man trivs som fisken i vattnet när man är på dansgolvet och de hårda elektroniska ljuden kittlar trumhinnorna och basen rör om i maggropen och bröstkorgen på en. Då spelar det ingen roll att man hör Rock Civilization eller Forever As One (ja, jag vägrar stava 'As' som 'Az'. Fuck the Z virus!) för femtioelfte gången. Man älskar den så innerligt ändå.

Zany & The Prophet - det här kan bli riktigt intressant! Zany har jag sett spela ensam, och som ena halvan av Southstylers (under Aqua-kryssen). The Prophet spelade på BK för ett bra tag sedan och levererade i början lite halvostigt men avslutade med 40-45 minuters hardcore. Det är inte illa, och vi var många som blev glada över det. Kombinationen av dessa två eminenta herrar (som faktiskt är legender inom genren) ska bli väldigt intressant att se och höra. Jag tror de kommer knäcka de andra hårdstilakterna med hästlängder.

Technoboy var det ännu längre sedan jag såg. Även han spelade på Otten vid ett tillfälle i slutet på 2006, och jag var absolut nöjd med hans spelning där. Eftersom han är sista hårdstilsakten så förväntar man sig nog att han spelar lite extra hårt då han bygger upp stämningen inför avslutningsakten - Neophyte. Jag har stort förtroende för Technoboy och förväntar mig således ganska mycket från hans set.

Så har vi då avslutningen, den som är core på riktigt. Hårdkärna all the way med Neophyte! Har inte sett dem live tidigare men hört väldigt mycket av deras material. Så länge de håller sig borta från metal-hardcore så blir jag glad. Och jag hoppas innerligt att de får lång tid på sig att spela också; ju mer hardcore på slutet desto bättre! Speciellt när vi talar om så duktiga producenter som Neophyte. Man förvånas ibland av vad musik kan göra med en. Jag är ganska säker på att jag kommer älska Neophytes set.

Vad gäller Ruffian så är jag glad att det är han som är MC. Enligt min mening är han den enda hardstyle MC som håller klass.

Jag längtar gryyymt mycket tills det är dags att åka! Jag, Claudio, Marcus, Erika och Maria kommer vara the crew som kickar ass stenhårt, 10 timmar i sträck!

Give me Qlimax Till I Die!


Qlimax year 2047?

Category: , , By Tom Fury
Såhär föreställer jag mig att det kommer se ut om 40 år, om the crew fortfarande håller ihop (och det är klar vi gör. Eller hur?):



Oroa dig inte om du inte förstår. Det mesta på bilden är internhumor. Du vet, sådant där du brukar skratta åt men som ingen annan förstår varför det är så roligt.

Och förresten, nu är det mindre än en månad kvar innan det gäller! Klaaajmääääx tåååtausendAndSevvven here we coooome!


Database connection is working on the TFS now

Category: By Tom Fury

FINALLY! After too many hours of work I've finally got it working. Let me just summarize what I've done.

First of all I downloaded and installed the SQL Server Management Studio Express so I won't need to use a command line tool on my local computer. A very good tool for configuring your SQL server. What I did was to detach the database from my Solution in Visual Studio and saved it somewhere else (D:\CodeMetricsDB.mdf & D:\CodeMetricsDB_log.ldf) - this was because I couldn't add files located in my user account directory into the Management studio (I wonder why?).

Anyway. After opening the application and connecting to your SQL serve, right-clikc Databases --> Attach... --> Add... --> Select the D:\CodeMetricsDB.mdf file and then press OK. Congrats, you have your CodeMetricsDB in your SQL Server now. (I renamed it to CMDB in this case afterwards).

In Visual Studio, open the Server Explorer and right-click on the Data Connections symbol --> Add new connection... --> choose your server name and then choose the DB from "Select or enter a database name:" (in this case CMDB). Press OK.

Now you're set to develop against a database in your SQL server instead of a separate file located in the App_Data subfolder (which is troublesome when moving it to the VPC).

You can from inside SQL Server Management Studio Express generate a script which creates the database with all constraints, stored procedure etc. Do this and run the script on the VPC, or copy over the files (.mdf and .ldf) and then run this from a command line (found the tip here):

sqlcmd -E -Q "exec sp_attach_db @dbname=N'CMDB',
@filename1=N'C:\path\CodeMetricsDB.mdf',
@filename2
=N'C:\path\CodeMetricsDB_log.ldf'"

Now you should have the database in you VPC SQL Server (check it by either download and install SQL Server Management Studio Express on the VPC (yes, it works fine for "regular" SQL Server too), or use sqlcmd like this):

C:\> sqlcmd
1> use CMDB
2> go
Changed database context to
'CMDB'
1>

If it works, you have the database. Or, you could use a stored procedure to list the databases:

C:\>sqlcmd
1> sp_databases
2> go
DATABASE_NAME
---------------------------------------
---------------------------------------
CMDB

master

model

msdb

ReportServer

ReportServerTempDB

tempdb

TfsActivityLogging

TfsBuild

TfsIntegration

TfsWarehouse

TfsVersionControl

TfsWorkItemTracking

TfsWorkItemTrackingAttachments

WSS_AdminContent

WSS_Config

WSS_Content

1>

As you can see the CMDB database is on top.

But it isn't all set and done by just adding the table. Secondly you'll have to alter the connection string to:

1 string connstring = "Data Source=ORCASBETA2_TFSV;" +
2 "Database=CMDB;" +
3 "Integrated Security=true;";

As you can see we've changed the "Data source" from .\\SQLEXPRESS --> ORCASBETA2_TFSV (line 1) and the database name must match (line 2). Another thing to think about is if it is preferred to use SQL Server Authentication or Windows NT Authentication. We don't know yet, but probably Mr. König can give us some guidance of what method to prefer (as of now, I've just used Windows NT Authentication).

So everything should work fine now, right? No. When trying to access the database via the webservice by running the client on the VPC, we get an exception:

---------------------------

---------------------------
System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process.
(provider: Shared Memory Provider, error:
0 - No process is on the other end of the pipe.)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at CodeMetricsService.registerMetrics(Int32[] theMetrics, String projName)
in c:\WCFService1\App_Code\CodeMetricsService.cs:line 32
---------------------------
OK
---------------------------

After some googling and research, I finally found a solution to the problem. Here's how to get around:

  1. Start SQL Server Management Studio Express (in the VPC)
  2. Go to [your server] --> Security --> Logins in the left pane
  3. find NT AUTHORITY\NETWORK SERVICE and double click it to open the properties dialog
  4. Go to User Mappings in the left pane of the properties pane
  5. Identify your database in the table to the right (in this case: CMDB) and make sure the checkbox is marked under the column "Map" for you database
  6. Under "Database role memebership for: CMDB [you databasename] check "db_owner".
  7. Now it should work fine!

I don't know if this is a smart thing to do when havin security in mind, and there are possibly other combinations of role memberships that you could use to make it work (instead of db_owner). But it worked and I'm satisfied with that as for now. Improving things will be a later problem - now we can continue our work - and that would be to create an adapter for the TFS warehouse (finally!).

Oh yeah, and another thing. It isn't really working well to develop in the VPC using VS 2008. Everytim I try to build my solution for the website, it never finishes the build - just keeps on chewing on forever (even though it says "Validation Complete"). I don't know what's wrong and I don't have time to find out - so I will continue to develop on my XP machine and transfer files as necessary to the VPC via FTP.

Phew! That's a long post. Hope it could be helpful for someone out there.



Stored Procedure done!

Category: By Tom Fury

I decided we're better off making a stored procedure instead of managing the SQL queries in C#. First of all it's more efficient since stored procedures are are pre-compiled such that they execute optimally. Second, the abstraction is good. Now you just have to call "InsertCodeMetrics" from the webservice instead of creating complex SQL queries at that level. The positive parts are many, the negative parts are non-existing. So, how did I do the stored procedure? See here:

1 ALTER PROCEDURE dbo.InsertCodeMetrics
2 (
3 @Metric1 int,
4 @Metric2 int,
5 @Metric3 int,
6 @Metric4 int,
7 @Metric5 int,
8 @ProjectName varchar(50)
9 )
10
11 AS
12 DECLARE @LatestEntry int
13
14
15 INSERT INTO SavedEntries (ProjectName) VALUES (@ProjectName)
16 SET @LatestEntry = (SELECT @@IDENTITY)
17
18 INSERT INTO MetricsData (EntryID, Metrics1, Metrics2, Metrics3, Metrics4, Metrics5)
19 VALUES (@LatestEntry, @Metric1, @Metric2, @Metric3, @Metric4, @Metric5)

Simple and easy and it works. This is how you would use it in the webservice (C#):

1 SqlConnection conn = new SqlConnection(connstring);
2
3 try
4 {
5 SqlCommand command = new SqlCommand("InsertCodeMetrics", conn);
6 command.CommandType = CommandType.StoredProcedure;
7 command.Parameters.Add("@Metric1", SqlDbType.Int).Value = theMetrics[0];
8 command.Parameters.Add("@Metric2", SqlDbType.Int).Value = theMetrics[1];
9 command.Parameters.Add("@Metric3", SqlDbType.Int).Value = theMetrics[2];
10 command.Parameters.Add("@Metric4", SqlDbType.Int).Value = theMetrics[3];
11 command.Parameters.Add("@Metric5", SqlDbType.Int).Value = theMetrics[4];
12 command.Parameters.Add("@ProjectName", SqlDbType.VarChar).Value = projName;
13
14 command.ExecuteNonQuery();
15 return "OK! Metrics added.";
16 } catch (Exception e)
17 return e.ToString();
18 }

Easy to both use and understand. (You can see how connstring is constructed in a previous post on my blog, if you're interested).



Getting it right with multiple dependent tables in SQL

Category: By Tom Fury

I've spent some time figuring out how to keep data integrity intact when working with several tables in my SQL Database. Several solutions are possible, and one of them are to create a stored procedure which takes care of updating several tables at once. I think that would be the wisest thing to do. However, I've postponed that solution for a while and made it work directly in my web service.

I discovered the @@IDENTITY attribute you can use in SQL. The @@IDENTITY attribute (or directive or whatever it is called) gives you the latest identifier for the table. So I've added it to my query when I insert an entry into the SavedEntries table:

myCommand.CommandText = "INSERT INTO SavedEntries (ProjectName) " +
"VALUES ('" + projName +"'); SELECT @@IDENTITY;";

Then I save the identity just selected:

string latestIdentity = myCommand.ExecuteScalar().ToString();

Finally, I alter the MetricsData table using the identity as a foreign key to the column EntryID:

myCommand.CommandText = "INSERT INTO MetricsData (EntryID, Metrics1, Metrics2, Metrics3, Metrics4, Metrics5) " +
"VALUES (" + Convert.ToInt32(latestIdentity) + "," +
theMetrics[
0] + "," +
theMetrics[
1] + "," +
theMetrics[
2] + "," +
theMetrics[
3] + "," +
theMetrics[
4] + ");";

I don't know if the conversion to Int32 is necessary (second row above), but it feels safer because latestIdentity is declared as a string.

Anyway, it works. Now I just have to make it work on the VPC. Furthermore, I'll give it a thought about implementing this in a stored procedure instead. We'll see what happens :-). Feedback and thoughts on this matter are much appreciated!



Inserting automatic timestamps into the database

Category: By Tom Fury

After some search I've found the way to do it:

  1. Open the table in Server Explorer and select the column in which you want to store the automatic timestamp.
  2. Under Column Properties, modify "Default Value or Binding" to hold: (getdate()).
  3. Save, and you're done!

Now everytime you insert a record into the database, the timestamp will be generated for you.



To get the SQL-thingy going....

Category: By Tom Fury

Now, I've managed to create my own database in my Solution in VS, created some (preliminary) tables, and I got it all working on my XP machine. But then we have that thing about transferring it to the VPC to get it to work in Windows Server 2003. Not so easy as I thought.

First of all, let's talk about my tables. This is just a preliminary design, but I think we will keep it somehow intact:

ID ProjectName TimeStamp (more identifying properties)

This table is called "SavedEntries". Everytime someone evaluates code metrics and sends the result to TFS, a new row will be added to this table in the database. ID is the primary key, ProjectName (or whatever ww in the future will choose as an artifact) will hold artifact-information. TimeStamp stores time and date for when the metrics were performed. We will perhaps need to store more attributes, so it is possible to extend the table with more columns.

ID EntryID Metric1 Metric2 Metric3 Metric4 Metric5

This table is called "MetricsData". It speaks for itself. ID is the primary key for the table, EntryID is a foregin key mapped to SavedEntries.ID (see SavedEntries table above). The meric reults are stored in his table.

That was the tables. Now to my problems. I've created a new SQL Database called CodeMetricsDB.mdf and it is stored in the App_Data folder (together with its CodeMetricsDB_log.LDF file). It works fine on XP with the following connection string:

string connstring = "Data Source=.\\SQLEXPRESS;" +
"AttachDbFilename=|DataDirectory|CodeMetricsDB.mdf;" +
"Integrated Security=True;" +
"User Instance=True;";

However, when I transfer the webservice files to the VPC for TFS, I get a severe exception. After some search on the net I found that it is probably the attaching of the CodeMetricsDB.mdf file that makes it all go to hell.

Mr. König helped me out a bit by telling me that I shouldn't use SQLEXPRESS but instead a "real" SQL server, and attaching the database by using some database tool. The problem is that I can't find any tool (or other way to do it) on the VPC. And even if I use the Server Explorer inside Visual Studio 2008, when I try to add a new connection, all I can choose as server is ORCASBETA2_TFSV\SQLEXPRESS. Why? Shouldn't I be able to choose some "non-Express-SQL-server"? I'm really confused.

So I'm stuck again, with something working on XP but not on the VPC. And I don't know if the Integrated Security + User Instance in the connection string is a wise thing to do. Perhaps I should use SQL authentication instead. But then again, I need to find some way to add users to the SQL server databases (which I don't know how to do in the VPC).

One positive thing is that I at least know how I should read information from the database usin C# (same connection string [conn] as above - it works on my local computer but not on the VPC):


1 SqlConnection conn = new SqlConnection(connstring);
2
3 try
4 {
5 conn.Open();
6 }
7 catch (Exception e)
8 {
9 return e.ToString();
10 }
11
12 // try to read data from the DB
13 try
14 {
15 SqlDataReader myReader = null;
16 SqlCommand myCommand = new SqlCommand("select * from SavedEntries", conn);
17 myReader = myCommand.ExecuteReader();
18 string result = "Result: ";
19 while (myReader.Read())
20 {
21 result = result + myReader["ProjectName"].ToString() + "....";
22 }
23 return result;
24 }
25 catch (Exception e)
26 {
27 return e.ToString();
28 }
29
30 conn.Close();

Lines 15-17 performs the reading operation. Everytime myReader.Read() is called, it consumes one row of the results returned from the SQL database. (In the above examples, it returns a string containing all ProjectNames stord in the SavedEntries table, separated by four dots).

I'll have to figure out how to solve this XP <--> VPC problem. As I've tried so far, developing on the VPC instead doesn't seem to help me at all. I'm pretty sure that it all will work fine if I could figure out a way to (1) attach the database to the SQL Server in the VPC and (2) create a correct connection string for the scenarioa in (1).



Finally it works...!

Category: By Tom Fury

Finally I've managed to get the webservice work on the TFS VPC. What did I do? There are some further things you have to have in mind when deploying on the VPC (when developed on another machine):

  • Make sure that the right version of ASP.NET is used (should be 2.0.50727). This is easily changed through the IIS Manager by right-clicking on your website --> properties --> ASP.NET tab.
  • You have to change some parts of the XML schema for your client. This is because it uses Windows authentication, and the <identity> entry must be adjusted to the user logged in on the VPC (in this case TFSSETUP). So make sure your <client> ... </client> part in [clientfilename].exe.config looks like this:

1 <client>
2 <endpoint address="http://localhost:38970/Service.svc"
3 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService"
4 contract="ServiceReference.IService" name="WSHttpBinding_IService">
5 <identity>
6 <userPrincipalName value="ORCASBETA2_TFSV\TFSSETUP" />
7 </identity>
8 </endpoint>
9 </client>

The thing you need to change is on line 6 (userPrincipalName). Also make sure that the endpoint (line 2) is linked correctly (see previous post).

Phew! Now I just have to do some fine-tuning to adjust it to our code metric model. And figure out how to make TFS recognize this webservice exists...(anyone?)



Another one with the same problem

Category: By Tom Fury

This guy had exactly the same problem as me. Too bad no solution is posted. As of now I have to choose between a 405 error message or an "endpoint not found" error message.

Congratulations Tommie. It's your lucky day....



Things to concider when deploying the web service

Category: By Tom Fury

The purpose of this post is mostly as a reminder for myself.

The Webservice

  • Copy the whole directory to the TFS installation (anywhere on drive)
  • Open IIS Manager
    • Right click on Web Sites --> New Web Site
    • In the Wizard specify:
      • Description: (whatever)
      • IP Adress and Port Settings, set IP = 38970. Leave the other fields as default. (next -->)
      • Path: Browse to the directory you copied over to TFS (next -->)
      • Permissions: Read, Run scripts, execute, browse (?)

The Client

  • Copy the .exe and the .exe.config to anywhere on TFS
  • Open the .exe.config file and scroll down. Find the tag and remove the subdirectory
  • Do something else so it works with permissions and authorization...


Some good news now...

Category: By Tom Fury

I didn't wreck my computer and I'm glad I didn't. I managed to create a working web service and host it on my own computer on IIS (running windows XP Professional). However, there are some complications when transfering my service to the TFS VPC (I'm developing on my own computer, usin Visual Studio 2008).

The problems encountered has to do with the configuration of IIS, and how they differ from XP <--> Windows Server 2003. First of all, it took some time before I even managed to create a (correct) virtual directory to store my web service in. Although managed (by editing the client .config-file and deleting the subfolder entry to make it point directly at http://localhost:38970/Service.svc, even though I've created a virtual subdirectory for my webservice), I still have som problems regarding authorization. Because the credentials differ from my XP installation and the TFS VPC, I'll have to go around that somehow. When I try to call the webservice it just shouts back at me:

System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---

I really don't know how to work around this part as of now. Suggestions would be greatly appreciated. (It works extremely well on my own XP computer! I just can't get it to work on the TFS VPC...).



Freaking out on IIS

Category: By Tom Fury

As I said in a previous post, I got the webservice working okay. But then it was hosted in a simple console application. Now I've been trying all day to host it on IIS, but I can't seem to get it to work. It's frustrating and I'll soon apply my sledgehammer ultra extreme super mega dropkick on my computer.

There's a bunch of articles on the web saying how you should do to host your WCF service on IIS. But the more I read, the more confused I get. Some bloggers mention one thing, others mention another. I get all things mixed up and to add to it all it doesn't look like I'm making any progress.

Jesus christ, I hope I'll solve this soon before I go nuts...



Facebook berättar historien

Category: By Tom Fury
Min homeboy Christoffer hittade ett par roliga bilder på den här bloggen. Check it out! Mycket roligt.


Stupid fuckface?

Category: By Tom Fury
Log från min FTP, samt meddelande från mig till idioten:

(000015) 2007-10-16 09:39:12 - (not logged in) (58.71.25.231) > USER Administrator
(000015) 2007-10-16 09:39:12 - (not logged in) (58.71.25.231) > 331 Password required for Administrator.
(000015) 2007-10-16 09:39:13 - (not logged in) (58.71.25.231) > PASS ********
(000015) 2007-10-16 09:39:13 - (not logged in) (58.71.25.231) > 530 Login or Password incorrect.
(000015) 2007-10-16 09:39:13 - (not logged in) (58.71.25.231) > USER Administrator
(000015) 2007-10-16 09:39:13 - (not logged in) (58.71.25.231) > 331 Password required for Administrator.
(000015) 2007-10-16 09:39:14 - (not logged in) (58.71.25.231) > PASS ********
(000015) 2007-10-16 09:39:14 - (not logged in) (58.71.25.231) > 530 Login or Password incorrect.
(000015) 2007-10-16 09:39:14 - (not logged in) (58.71.25.231) > USER Administrator
(000015) 2007-10-16 09:39:14 - (not logged in) (58.71.25.231) > 331 Password required for Administrator.
(000015) 2007-10-16 09:39:15 - (not logged in) (58.71.25.231) > PASS ********
(000015) 2007-10-16 09:39:15 - (not logged in) (58.71.25.231) > 530 Login or Password incorrect.
(000015) 2007-10-16 09:39:21 - (not logged in) (58.71.25.231) > USER Administrator
(000015) 2007-10-16 09:39:21 - (not logged in) (58.71.25.231) > 331 Password required for Administrator.
(000015) 2007-10-16 09:39:26 - (not logged in) (58.71.25.231) > PASS ********
(000015) 2007-10-16 09:39:26 - (not logged in) (58.71.25.231) > 530 Login or Password incorrect.
(000015) 2007-10-16 09:39:27 - (not logged in) (58.71.25.231) > USER Administrator
(000015) 2007-10-16 09:39:27 - (not logged in) (58.71.25.231) > 331 Password required for Administrator.
(000015) 2007-10-16 09:39:35 - (not logged in) (58.71.25.231) > PASS ********
(000015) 2007-10-16 09:39:35 - (not logged in) (58.71.25.231) > 530 Login or Password incorrect.
(000015) 2007-10-16 09:39:39 - (not logged in) (58.71.25.231) > USER Administrator
(000015) 2007-10-16 09:39:39 - (not logged in) (58.71.25.231) > 331 Password required for Administrator.
(000015) 2007-10-16 09:39:39 - (not logged in) (58.71.25.231) > PASS ********
(000015) 2007-10-16 09:39:39 - (not logged in) (58.71.25.231) > 530 Login or Password incorrect.
(000015) 2007-10-16 09:39:40 - (not logged in) (58.71.25.231) > USER Administrator
(000015) 2007-10-16 09:39:40 - (not logged in) (58.71.25.231) > 331 Password required for Administrator.
(000015) 2007-10-16 09:39:53 - (not logged in) (58.71.25.231) > 214 Fuck off dipshit, stop trying to access my ftp. - You can reply using : SITE MSG
(000015) 2007-10-16 09:40:07 - (not logged in) (58.71.25.231) > PASS ********
(000015) 2007-10-16 09:40:07 - (not logged in) (58.71.25.231) > 530 Login or Password incorrect.
(000015) 2007-10-16 09:40:07 - (not logged in) (58.71.25.231) > disconnected.

Jag undrar om han kommer försöka igen...


Freaking out on IIS

Category: By Tom Fury

As I said in a previous post, I got the webservice working okay. But then it was hosted in a simple console application. Now I've been trying all day to host it on IIS, but I can't seem to get it to work. It's frustrating and I'll soon apply my sledgehammer ultra extreme super mega dropkick on my computer.

There's a bunch of articles on the web saying how you should do to host your WCF service on IIS. But the more I read, the more confused I get. Some bloggers mention one thing, others mention another. I get all things mixed up and to add to it all it doesn't look like I'm making any progress.

Jesus christ, I hope I'll solve this soon before I go nuts...



Orsaken till varför Thore är singel

Category: By Tom Fury
Hade ett intressant samtal om drömmar med min ständige vapendragare Thore. Han sa bland annat det här:
Minns en tjej jag slagga med, hon hade satt mobilen på väckning, men utan ljud, så den vibrerade bara, jag drömde att ett bi surra i örat på mig, så jag försökta slå bort det, men råkade slå tjejen i ansiktet.
Nu förstår jag varför han blev singel.


Words From The Gang

Category: By Tom Fury
I remember the day when I first heard electronic music
I knew back then that the illegal computer sound was gonna be my call
My heart got hooked on 4 by 4 beats
When house took his jurney with Jack Chicago and acid house
Now my heart is hooked forever

I don't care if it's french-tek, hardstyle, hardcore, oldschool or jump
I don't understand people who are satisfied with ordinary pop music
They just listen to whatever radio station decide they should like
Followed by an overkill of ringtone commercials meant for kids

And by God, they like it!

Some people even think that house clubs are for weirdos only!
Maybe they're right, maybe we are weird
Maybe this music is weird and maybe the clubs are overrated
But we're in this together,
If you're in the scene, being a DJ seems like a natural path to follow.
Ha, and back in the days DJ were weird people who liked music in a weird way
Back then you would have to be a nerd to become a DJ,
Now a days everybody wants to be a DJ,
Now a days everybody wants to be that nerd,
It sickens me, I hate those smartasses who think that DJ is an easy way to get laid.
Well .. Get a life!
If you're not in it for the love of the music, would you please fuck off!


Jag har definitivt hittat min nya favorit.


Technoviking - Nu med subtitles!

Category: , By Tom Fury
Förbättring av videon jag postade sist (Tack Stina för länken):




Besiktning, Tandläkare och jobb

Category: By Tom Fury
Idag känns det som jag har fått ganska mycket uträttat. Började morgonen med att åka till besiktningen med Morfars (numera Mormors) bil. Det gick väl inte så bra som det kunde ha gått kanske. Spindelled på vänster sida var glapp och det var läckage i avgassystemet. Så det ska jag åka och fixa någon utav dagarna nu. Annars gick det prima!

Därefter var det besök hos tandläkaren. Skulle kostat 410:-, men blev bara 15:- (för parkeringsavgiften...). Min tandläkare var nämligen så snäll och bjöd på avgiften, bara för att det gick så snabbt. Hade i och för sig bara beställt konsulttid, men ändå. Det är en stor besparing som gjordes. Slutsatsen? Jag behöver inte göra något åt mina tänder. Inte ännu, i alla fall. Om det skulle visa sig att vänster framtand flyttar sig mer om ett par år så kan man ta till åtgärder då. Men inte i dagsläget, det var för lite. Och jag håller väl med, var bara lite orolig över att det skulle bli mycket värre än vad det har blivit. Så verkar inte vara fallet dock, vilket är skönt.

Det har rört sig en hel del på jobbfronten! Jag har varit hos Sogeti 2 gånger nu på intervjuer, och väntar på besked från dem med jobbförslag (eller nekande, såklart). Imorgon ska jag gå på intervju för arbete på Ericsson, och på onsdag nästa vecka är det intervju på Cybercom. Ska bli väldigt intressant, och känns samtidigt bra att ha lite att jämföra med.

Imorgon bitti blir det att hjälpa farsan att få upp båten på land, om inte min kusin hade tid att hjälpa. Då blir det att fortsätta jobba med examensarbetet istället. Ja, det har du ju kunnat läsa om här på bloggen också, så ingen mening med att tjata om det ytterligare. Framåt går det, men inte riktigt i den takt som man skulle vilja kanske.

Och inte nog med det - mycket fest är på gång! Den 31 oktober är det Zatox (och Tiesto...) på Otten, den 2 November är det Showtek på Sweapsound (Blue Heaven), och sedan bär det fasen av till QLIMAX! Jag är grymt peppad, och det ska bli hur kul som helst!

Ska försöka hinna med att träffa så många människor som möjligt nu också. Vet att jag har haft dåligt med tid (och har det fortfarande), men jag gör mitt bästa för att höra av mig och försöka ses.


Connecting to TFS

Category: By Tom Fury

I managed to make a short program which connects to the TFS Server and extracts information from it. The program is written in C#, and is not really hard to make. I'm not sure though if that's the right way to go. I know that I can implement some C# code in my webservice, but it's still not clear to me if I should connect to TFS this way or another.

Anyway, I do it like this, in a simple C# console application (yes, it is from an article at MSDN - I just don't remember the source right now):

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Client;

namespace MyFirstApplicationForTFS
{
class Program
{
static void Main(string[] args)
{
// Let the user choose a TFS Server
Console.Write("Please enter a valid TFS Server or URI: ");
String tfsServer
= Console.ReadLine();
tfsServer
= tfsServer.Trim();

// Connect to the TeamFoundation Server
Console.WriteLine();
Console.Write(
"Connecting to Team Foundation Server {0}...", tfsServer);
TeamFoundationServer tfs
= TeamFoundationServerFactory.GetServer(tfsServer);

// Example: Connect to the WorkItemStore
Console.WriteLine();
Console.Write(
"Reading from the Work Item Store...");
WorkItemStore workItemStore
= (WorkItemStore)tfs.GetService(typeof(WorkItemStore));

// Example: Display the details about the teamFoundationServer
Console.WriteLine("\n");
Console.WriteLine(
"Team Foundation Server Details");
Console.WriteLine(
"Server name: " + tfs.Name);
Console.WriteLine(
"Uri: " + tfs.Uri);
Console.WriteLine(
"AuthenticatedDisplayName: " + tfs.AuthenticatedUserDisplayName);
Console.WriteLine(
"AuthenticatedUserName: " + tfs.AuthenticatedUserName);
Console.WriteLine(
"workItemStore:");

// Example: List the projects in the WorkItemStore.
Console.WriteLine(" Projects.Count: " + workItemStore.Projects.Count);
foreach (Project pr in workItemStore.Projects)
{
Console.WriteLine(
" " + pr.Name);
}
Console.WriteLine(
"\n\nDONE!");
}
}
}

It works fine, I've tried it on the TFS VPC. But as I said, I'm not sure that I'm on the right track here. Perhaps webservices that are to be a part of TFS should communicate in some other way with the server. I'll have to study some more. Please do give me some feedback on my thoughts!



I did it! WCF Conquered

Category: By Tom Fury
Found this excellent example on how to implement a simple web service (explained step by step on this blog). It helped me a lot to understand how I am supposed to do. And, amazingly, I got it working! I’m so overfilled with joy right now I don’t know what to do. I’ve spent almost all day figuring out how to use WCF and configuring IIS to get around all possible types of error messages – and finally, it worked.

Now, there are obviously more things to do. First of all I need a client which sends the code metrics data to the web service (I did implement a simple client, but Magnus is taking a deeper look into making a client via a package for VS 2008). Secondly, the web service needs a method that receives these code metric data and finally forwards them into the Data Tier on TFS. I know how to construct a method that receives the data. Now I need to concentrate on two primary things regarding the web service:

  • How does TFS register that my web service exists? (I think I’ve read about that somewhere but forgot it by now… typical!)
  • How does the web service push the data into our operational store?
  • Furthermore, after these two things have been dealt with, I need to find out:
  • Where and how do we implement the operational store? (Yeah I know, in the SQL server in TFS – but I need more details! Preferably a guide or walkthrough)
  • …and then all the things concerning the adapter, the XML schema and those things in that area.
TODO-list:
  • Learn WCF
  • Build a web service
  • Make XML schema for the adapter
  • Create Adapter
  • Create operational store
  • Write some parts of the master thesis (theoretical)