Mikael Johansson

Focus on your ideas

I just read a post over at lifehacker and realized that this is what I have been doing for the past three months, perhaps not with the same consistency but basically the same. I have been trying to spend some time each day doing one of three projects -

  • -This website, my "blog"
  • -Personal economy-program
  • -Driver license for motorcycle
Now these are all semi-small projects but it is still something that I personally want to accomplish.
To qoute Mark Twain: "There are people who accomplish things and people who claim to have accomplished things. The first group is less crowded."

Read the article here

Bummer!

I just deleted the entire source code for this website... all I have left is the precompiled version.. this might take a while to rebuild..
Bummer...

Ugly coding habits? Got em

So I did some soul searching this morning while starting a new project, or should I say code searching? Either way I caught myself cheating in my own code to make things "easier" for the moment just to get things started.
Now I really should do things "by the book", especially in large scale projects. If it is just an application that I am certain of being the only person using I can allow myself to write some ugly code because hey - I´m friggin lazy and want the shits done!

Anyhow, this got me thinking and I scimmed through more code that I have recently written and realized that I have some nasty habits while coding. One of these habits is not applying the dry-principle.
Time and time again I write code that could easily be reused instead of reinvented. I also tend to be a poor name-giver to variables which causes some confusion from time to time as well....

What are your ugly habits?

Twitterizer and json = errors?

So after spending somewhere around 4 hours googling errors and all possible combinations and code examples for the Twitterizer status-script I finally found a solution.

Apparently TwitterTimeline.UserTimeline does not work with json.NET 4.0.8 or higher and results in a JsonSerializer error. So basically Twitterizer more or less requires json.NET 4.0.3 and here is the kicker - when installing Twitterizer using the package manager command: Install-package Twitterizer it automatically installs the latest stable json.NET = 4.0.8!!!

Now it took me a while to first find the problem and about 30 minutes to find this solution.

  • Using package manager install twitterizer: Install-package Twitterizer
  • Uninstall json.NET 4.0.8 using: Uninstall-package json.NET -force(the -force attribute is important)
  • At last run: Install-package json.NET -version 4.0.3
  • Restart VS.NET
And voila - there you have a working Twitterize library!

Before payday

Does it not seem strange to you that about two or three days before payday your money just seems to disappear?

I like to consider myself quite economical and usually have full control to where my money goes, mostly because I used to have a spreadsheet with pretty pie charts displaying just how much of my budget went to where.
Another reason is a video on TED.com about your future self explaining why I was constantly being cheap while stacking my money on a pile..well, a small pile.

The past six months I've been saving a big piece of paycheck each month and I've got a fair amount saved. So now it is time to give my future self the finger. Ok, might be a bit rude but I will at least ignore him!

Time to have fun and spend some money..when the paycheck comes in that is..

Twitterizer and databases

So I wanted to add some features to my newly created blog and what is better than one of my favourite social networks - Twitter!

So I started browsing api´s and stuff and stumbled across twitterizer, I still haven´t really played around with it for real but from what I´ve seen so far it is pure love.
I mean, I installed the dlls through the package manager and voila - functionality there.

Then there´s the second part...databases. I kinda brought this on myself so once again.. rushing in to things head first is a BAD idea.
I am still in the thinking form of a scriptkiddie that I did not really think the structure of my data access layer and business layers through. I have after two hours of playing around with Twitterizer and stored procedures figured out that I will have to rebuild 50% of my dal and about 30% of my blls...

I kinda hate reality checks sometimes...

Page - 1 2 3 4 5 6