Fortsätt till huvudinnehåll

Inlägg

Visar inlägg från 2016

Back to Linux

I have been using Windows on my main computer for some time now in order to be able to try out different C# stuff. However, despite Visual Studio being a real nice IDE I think Linux gives a better overall development experience. To still be able to try out different C# stuff I have switched to Linux and installed .NET core and the Visual Studio Code IDE. Of course .NET core lacks a lot of functionality available in the complete .NET framework and Visual Studio Code is much less powerfull than the full fledged version. Still so far it feels sufficient for the tests I am writing outside of working hours. And it feels good to be back in Linux :).

Inter process communication with .NET Core using RabbitMQ

Did a hello world test with  RabbitMQ on .NET Core running under Linux. Must say it was really easy. Took no more than 15 minutes to set up the server, writing the code for the sender and the receiver and sending the first message between the applications. Now lets see if this is something that can be used for creating event driven microservices...

Microsoft releases Visual Studio for Mac

It seems like Microsoft is putting a lot of effort in getting .NET available for more platforms than Windows. The release of  .NET core  made some basic .NET functionality available on both Mac and Linux and the upcoming release will add quite a lot more functionality to the core packages. Now, in order to develop in .NET you might want a good IDE. Latest news is that Microsoft releases  Visual Studio for Mac . Currently available as downloadable preview. In the future this might be a better alternative than running Visual Studio inside Windows on a Virtual Machine running on Mac that I've seen some developers are currently doing.

Be a Power(shell) user

In their latest development release of Windows 10 Microsoft has gone to great lengths to replace the well known command prompt with Powershell. Start -> Run -> "cmd" will start Powershell, shift + right-click in Explorer and selecting to open a command window will also start Powershell. If you are a Windows developer, this is a good time to start getting to know the Powershell. Check out this link  Getting started with Windows Powershell .

LINQ Kata published on Codewars

Published my first Kata on  Codewars  today. The goal of the Kata is to give the student a basic introduction to LINQ by giving some examples where loops are used and asking the student to replace the loops with methods from the System.Linq namespace. Those that are Codewars enabled can try out the Kata at https://www.codewars.com/kata/581d2647b2d02e33be000094 Have fun!

Do not use CMake 3.7.0-rc3 with Visual Studio 2015

In an attempt to compile part of an autocompletion plugin for Vim I had to download and install CMake (usually I do not use CMake but this plugin required it). In the time of writing the latest version of CMake available on CMake.org is the release candidate CMake 3.7.0-rc3. So I grabbed it and went on with the installation steps. After CMake generation when trying to build (cmake --build) I noticed that the build failed since the generated files targeted Visual Studio 2010 and not Visual Studio 2015 as I had specified. I deleted the files and regenerated, only to end up with the same errors. Scratching my head for a while I finally did an attempt to uninstall the CMake release candidate and install the latest release version, 3.6.3, instead. With this version of CMake everything worked as expected.

RSA key manager for Windows

I spent the Friday evening coding an RSA key manager for Windows . What a great evening! After spending quite some time reading up on cryptography in Windows I noticed that Windows have built in support for storing RSA keys securely in something called  RSA Key Containers . However, there seems to be no tool available to actually manage these containers. Microsoft themselves refer to a tool called  aspnet_regiis  (WTF!?) for creating and exporting an RSA Key Container. So, after spending a couple of hours behind the keyboard (Dvorak layout, VsVim in Visual Studio), I can now say a tool dedicated to creating, deleting, exporting and importing RSA Key Containers in Windows now exist.

Goodbye Emacs, it is Vi time!

I have used Emacs for quite some time. However, now that I am working with C# development I work a lot in Visual Studio. Initially I tried to find good keybindings to emulate Emacs in Visual Studio but without any luck. Now I have taken the descision to go Vi. Check out the  VsVim extentsion for Visual Studio .

Simple command line tool for generating MD5 or SHA1 hashes for a file

I am about to do some security features at work so therefore I have been reading up on how to use C# to calculate SHA1 and MD5 hashes. What better way to learn than doing some hands on programming, I thought. And wrote a simple command line tool in C#. Source code is freely available at GitHub, see  https://github.com/Backhage/SigningTool If you wan't a compiled copy of the tool, just add a comment and I'll supply it.

Read all about it

I just came across the term "covariant" in the context of Generic Modifiers in C#. Apparently " Covariance enables you to use a more derived type than that specified by the generic parameter." To me the above sentence is just mumbo jumbo. I need to look into what this means in practice and why and when I would benefit from "covariance". To be continued...

Some comments on comments

Recently we have been discussing coding guidelines at work. A topic that often pops up during such discussions are Comments. What should be commented, how should the comments be formulated etc. Personally I have the following preferences when it comes to comments in code: A comment should explain why  a piece of code does what it does, not what  the code does. If you feel a piece of code needs a comment. See if it is possible to make the code easier to understand rather than commenting it. Only use special mark-up like Doxygen if you actually generate documentation from it. I have seen cases where Doxygen-like syntax was used all over the code, only obfuscating the text. Public interfaces intended for users of your lib/class should be documented, and documented well. Internal/private interfaces and classes does not require documentation. Put effort on making the code really easy to understand rather than adding a bunch of comments. Keep comments short and clear. Happy comm

LINQ

Now that I am working with development in C# I have started looking into some .NET specific stuff. Right now I am deep diving into Language-Integrated Query,  LINQ . LINQ can often be used to replace loops where you iterate over a set of values and perform some kind of operation on the values that matches a certain criteria. For example, assume you have a large set of random integers and you want to extract those that are divisable by 7. The standard way to solve this is to use a for-loop and copy the numbers where n % 7 == 0. With LINQ this becomes a one-liner: var divisableBySeven = (from i in ints where (i % 7 == 0) select i).ToArray(); Pretty neet.

Taking a struct from the unmanaged to the managed world

In .NET the Common Language Runtime (CLR) virtual machine manages the program execution. Code that is written in a .NET language is hence called Managed Code, while code like C and C++ that compiles to native programs that doesn't require CLR is referred to as Unmanaged Code. It turns out that many types can not be shared straight up between managed code and unmanaged code. To do this the types needs to be converted. This conversion process is called  marshaling . I got some real hands on experience with marshaling the last week when I worked on moving and re-writing C++ code to C#. One of the structs (that included an array of another type of struct, that in turn included another struct...) in the C++ code is written to disk with exact requirements on the number of bytes the data is allowed to occupy. My first naive approach was to simply replicate the structs in C# and, using a BinaryFormatter and a MemoryStream, convert them to a byte array. This approach worked very well

Wish that it was this easy to interact with serial ports when serial ports were actually used

I won't go into that much background story but I spent some time today reading and writing to COM ports using C#. This is extremely simple. Just create a new SerialPort (some parameters, like the name of it is good to set), open() it, and start writing stuff to it. Unfortunately most modern computers come without any actual serial ports. But for testing purposes you can download a virtual port driver, like  com0com , that works perfectly fine. Set it up and you are soon ready to start testing your serial port application against a mock.

First day at the new job

Had a great first day at the new job. Spent most of the time setting up the computer and verifying that I have all accesses I need. After some minor setbacks I was able to clone the git repository I will be working in and do a first successful build. I must say it feels very nice to have a local, powerful, machine to develop on as an alternative to remote development on a NX server as I have been doing for the last years.

Vacation is coming to an end

It has been great having a month off work. I have spent most of the time with my family and not much time coding. However, I did get a Raspberry Pi 3 from my previous co-workers when I quit (thanks a lot guys!) and I have been loading it with Windows 10 IoT and currently I am setting up Visual Studio to be able to program and debug it. See how to set up your Raspberry Pi here:  https://developer.microsoft.com/en-us/windows/iot

C# practice

In my coming job I will do most of the development in C#. Therefore I am currently practicing writing stuff in C# using Visual Studio. If you, as I do, know a bit of Java, some C, and some C++ you can get started very quickly (I actually did pass the recruitment coding test, that I had to do in C#). But I do not aim to be on a "getting started" level for very long. Any tips on advanced C# topics that are good to learn are appreciated.

Time for a change of scenery

This week I quit my job. There are several reasons to my descision but the determining factor was that my current job wasn't going in the same direction as I want my career to go. Moving on to another employer can be emotional. You can feel sad for leaving people you have become good friends with, it can feel a bit scary to move on to something you don't know that well, and at the same time it is exiting to explore something new. I have all these emotions. But I feel that I need to take this step. I have been working pretty much for the same company since 2009, but the tasks have been very different and no single year has been the same as any other, hence I have learned a lot and as far as I know both fellow developers and managers agree that I have made a good contribution over the years. It has been a good cooperation between me and the company. However, lately I have felt that my career isn't going in the direction I want it to. This has lead to my motivation dropp

Should you test developers before hiring them?

I have been shifting back and forth on the question if it is a good idea to let developers do some kind of coding test before hiring them. After careful consideration I have come to the following conclusions: Yes! You should test the developers coding skills somehow. The test should be performed in a real environment, using real tools. Not on a whiteboard or by using some online web page. Invite the applicant to take the test at your office. Sit together for a while and help him get started but also give him the chance to sit on his own for a while. The test must be relevant to the kind of job he is applying for. One of the most important aspects is the ability to write extendible and maintainable code. This is very very important. So here comes the rationale: The number of years of experience stated on a paper DOES NOT SAY ANYTHING when it comes to telling how good a developer is. I have worked with people directly from the University that produce great code that is well

Want efficiency? Go see each other!

Spent the last week in Canada focusing on teaching fellow colleges the ins and outs of a tool we develop and sharing knowledge on other pieces of software we develop as well. Of course we also wanted to learn as much as possible from them and had some really good discussions and training sessions. I am certain that we were able to get more done in those few days than what had been possible with weeks of phone meetings and e-mails. Too bad some companies think forbidding travel all together saves them money.

First Coding Dojo completed

Yesterday we had our first Coding Dojo at work that I helped to arrange. It was fun. It was challenging. It was great. I believe that there is a thirst among us developers where I work to just sit and code something from scratch, and that you can just throw away if it did not end up the way you wanted it. The Dojo provides this opportunity, and even getting paid while doing it. Of course the Dojo is not only for fun, it is a way for us developers to practice and get better at our profession. Better developers is good for the company, win-win. The goal now is to arrange at least one more Dojo before the vacations. I am sure that it won't be any problem at all filling up the seats.

Object Oriented Analysis and Design

I have come to realize that I need some hands on practice on Object Oriented Analysis and Design ( OOAD ). During the years I have read several books with good advice on how to design and structure your code for good abstraction and re-usability. But what good is theory that is not put into practice? To get this going (again I should say. Had a good run down this road during the years 2011-2013, but that really needs refreshing) I have started with a Java Project "The Guitar Store" where I will put extra focus on doing a good design.

Doing the Codility lessons

Since my initial contact with Codility some years ago they have added  lessons . I feel a bit bad about that I recently failed one of their tasks that is considered an easy one. Therefore I will attempt to remedy that by taking all the lessons, thoroughly. I have printed all the material and will read it in detail and then do the lessons. Currently I am at lesson 5, Prefix Sums. The Genomic Range Query task was quite tricky (hint: you can use more than one Prefix Sum). No solutions will be posted here this time. But I am open for discussions on how to approach different problems. Today I will try to crack 'MinAvgTwoSlice'.

My computer has been hijacked

I am typing this on my smartphone since my computer has been hijacked... by my common-law wife... who is watching cake shows on Youtube and playing Facebook games (it has been like this for the last week). Time to buy an extra computer! Any ideas on what to look at? It is a jungle out there. I will be running some Linux flavor and code like mad. No games though. We have gaming consoles for that.

Hey, there's a framework for that

Remember the iPhone 3G commercial  "There's an app for that" ? I got a similar feeling yesterday when I discussed my current mini-project "The Record Collector" with an old collegue of mine. Just after giving him the summary he said "Oh, so you are using Play?". Play, I thought, what is that? Well, it turns out that  Play  is a framework that "makes it easy to build web applications Java & Scala". I haven't thought of The Record Collector as a web application, but maybe it should be... Need to sleep on it.

Coding Dojo for smart memory usage

The target hardware that I develop for at work have several types of memory. Some are fast, but extremely limited, others are large but not that fast. As a developer for that architecture it is very important to make wise choices when it comes to how to use the different types of memory (no tools are available for helping out, it is all up to the developer). Several new developers with limited or no experience of developing under these cirumstances have recently joined us. In order to help them understand the impact different memory usage can have I have started to prepare material for a  Coding Dojo  which will start off with a non-optimal memory model and by applying some simple patterns they should be able to optimize the performance by several hundered percent. Looking forward to sharing my knowledge. We all should, as much as possible.

The Record Collector, now with simple CLI

Some must haves -  like adding and removing records - are still missing but now there is a CLI. Currently it allows setting the database URL, the default user name, and to query the database and list all records (see screenshot below). Under the hood I use  args4j  for parsing command line arguments/options and  Preferences  for storing the user preferences. As usual the code can be found on  GitHub .

Tasty mocking framework

Mockito  is now being used in  TheRecordCollector . So far I use it for mocking user settings and database interactions. It seems like a highly capable mock framework and I have just started to scratch the surface. Adding Mockito to your Gradle or Maven project and getting started is super simple (check the Mockito main page). I understand why  Java is the most popular programming language today .

Let learning take time

I've read somewhere that the most time consuming part of programming is learning. Yesterday I got some hands on experience of this when solving three Codility tasks in a limited time. The time given to solve the tasks was generous, still I failed to deliver proper, well tested and clean solutions. And my self confidence dropped a couple of levels. Then I started thinking of why I was unable to deliver better solutions and I realized I had spent most of the time given not solving the actual tasks, but rather trying out and learning how to do certain things, like slicing up strings, working with date and time and so on, in Java. The Codility tasks were to be solved using the Structured Query Language (SQL) and Java. Two languages I really wan't to add to my toolbox but have limited experience with. The second Java task involved (amongst other) extracting time (hours, minutes, and seconds) from strings and converting them to Java objects that can be added together and compare

Code at work, code at home, dream of coding

I still remember my first lines of code. Ten years old, C64 BASIC, 10 PRINT "Eric "; 20 GOTO 10;. Now 26 years later I do more coding than ever. I code at work, at home and even dream of solving coding tasks (actually I am a bit concerned about the dreams part, doesn't feel all that healthy). I believe the best thing about coding is that it is so easy to get started and no matter how much you learn there is always so much more to pick up. Recently I have been started thinking about ways to show my oldest son things you can do with code. He can not read much yet so showing him lines of code won't give anything just yet. I have heard about some apps and games where you code using pictures in sequence. Will check what I can find and put up some reviews here later.

Some links to look more at

This post is a "note to self" to look more into these links: https://blog.idrsolutions.com/2013/09/5-tools-to-help-you-write-better-java-code/ https://blog.idrsolutions.com/2014/06/java-performance-tuning-tools/ I am looking for tools for static code- and performance analysis on Java code.

Test Driven Development of JavaFX

I just completed the  code.makery javafx-8 tutorial  by Marco Jacob. It took a couple of hours to complete and there is quite a lot of implementation done ahead of it being needed which make it a bit hard to follow. But overall I recommend it to get a good understanding how the different MVC parts in a JavaFX project interacts. Now, is it possible to use a TDD approach when developing a JavaFX application? Seaching the net a bit I found  this  presentation by Hendrik Ebbers that points to  TestFX . A test framework that provides "simple and clean testing for JavaFX". I am adding TestFX to the list of tools to be used during the development of my Record Collector Java mini project.

GUI prototyping with Scene Builder

Back in the days when I used to code HTML (for fun) I stayed away from WYSIWYG tools like FrontPage and Dreamweaver. When it comes to GUIs however I think it can be helpful to use a graphical layout tool. At least for prototyping. Today I did some prototyping with Scene Builder  in order to create a GUI for The Record Collector application. My impression so far is that it is easy to work with and speeds up the layout work a lot. Now let's see if I can turn The Record Collector to a good Model View Controller (MVC) project.

Swing on over to Java FX

Creating GUIs is something I do quite rarely. Hence when I started thinking about the GUI for the Record Collector application I opened up my old Java book and started reading about Swing. Today however I was informed that Java FX is preferred over Swing. Ok, then let's  Swing on over to Java FX .

TheRecordCollector is live on GitHub

The first commit for my new mini project has been pushed to GitHub. It can be found at:  https://github.com/Backhage/TheRecordCollector So far it doesn't contain much but I will be pushing as soon as I have something new. The "customers" will be my father and my uncle so I plan to demo something simple, but functional, to them as soon as possible.

New Java mini project

Today I started a new Java mini project. This one will be a bit bigger than usual. The target is to create an application for keeping a database of vinyl records. My father and uncle are both record collectors and are lacking an easy desktop application for keeping a record of their vinyls. During the development of this application I am planning to: Use IntelliJ  as IDE instead of Eclipse  that I normally use. Use Git  for version control. Add the project to  GitHub . Use  Mockito  for mocking the Data Access Object (DAO) when testing. Create a MySQL  database that is stored on a remote server and can be accessed over the net. Create a GUI for the application. So far I have installed IntelliJ and MySql locally. Set up a database and tried out some queries to see that it works. Also prototyped some SQL requests in Java.  One thing I realized that I really need to consider is how to handle exceptions due to database access issues. Also, I don't know of a good way to

Back to the world of functional programming

After some mini projects in Java (requesting bus departures using the local bus company's REST API and trying some fork/join optimizations) I returned to the functional programming course today. I must say that higher order functions ,  anonymous functions , and  traits  makes my head spin. Doing the exercises is quite challenging, but really fun! One thing that bugs me a bit though is thet  sbt  takes a bit too long to compile and run the tests ( real 0m8.395s ) which makes the design loop a bit longer than I would like. Remember that this is a really small project that only includes a couple of source files and no I/O. Compile and run the tests should take less than a second. I wonder how sbt scales. Anyway, great approach by Martin Odersky to advocate a test driven approach to the excersises!

The importance of good preparation work

This weekend I have been working on our staircase at home. The previous owners re-painted the staircase before they moved out. Unfortunately they "forgot" to do the preparation work properly so now the paint is flaking and looks terrible. Just as important as preparing before you paint is preparing your software before adding new functionality to it. When you are planning to add a new feature take a moment and ask yourself if your code is ready for it. The first coding task should be to ensure the new functionality fits well into the structure of the part of the code that is affected. There is a big possibility that some restructuring of the code is needed before it can be extended in a good way. Doing this will help you keep the code in a good condition. You don't want code that looks terrible and needs to be stripped down completely and "repainted, do you?

Hey kids! Stay away from POT.

I have been thinking about concurrency and parallelism a bit recently (hard not to when you are taking a course on functional programming and in your daily work develop software targeting a many-core processor). I thought it would be interesting to read up a bit on how to do parallelism in Java. After a bit of searching the net I found  this  Oracle article by Julien Ponge. The article starts by describing the usage of Plain Old Threads (POT) and the shortcomings involved in using them. It goes on describing the introduction of the concurrent packages in Java 5 which was later refined in Java 6 and finally introduces fork/join that was added in Java 7. The article has many examples and a provides a good overview of concurrency and parallelism in Java 7. I would recommend a read through for anyone planning to go beyond single threading in Java. Me, I am planning to do some benchmarking sorting 1 GB of random ints. Maybe the generation of the ints can be done in parallel as well...

Doing some Java POST requests

Next step in my JSON (GSON) Java mini project is to request some data from a web service using a Representational State Transfer (REST) API. The one I choose is the local bus/boat/train company's web service for requesting departure times. However, to be able to use their API I first needed to register at their website, then trying to figure out how to request OAuth2  tokens using Java HttpsURLConnection. So far I have gotten so far as to get a 400 (bad request) response. I am thinking I am mixing up url parameters and request properties. Will experiment a bit more. Conclusion so far, debugging this is tricky. Is there a better way than trial and error (yes, I have RTFM, which is unfortunately not up to date)?

Discuss these questions with your fellow developers

Reading the book "The Software Craftsman"  got me thinking. Some questions that I really would like to bring up with our team are: What does "well crafted software" mean to you? What characterises a good developer? What is the next thing you would like to learn/explore? Is it possible to learn that in your current position/role? Which tools do you use often that are time consuming/hard to use/bad in some way? What is stopping you from changing them to something else? Is our company good at attracting great developers (this can be sensitive, if no, what does that make us)? Would you still like to be a developer a couple of years from now? Why/why not? I have my mind pretty set up at the moment. But discussing the questions above might make me reconsider some of my current standings.

Java Reflection, setting private fields that does not have a setter method

I was a bit puzzled when I was experimenting with GSON and noticed that it was possible to create new objects and set their private fields (member variables) even though there were no public setter methods for the private fields and there was no constructor that could be used to set them either. When talking about it with a fellow developer he mentioned that probably Java Reflection  was used. Java Reflection can be used for a lot of things, see this comprehensive tutorial  by Jakob Jenkov for a good overview. Below I will show how it can be used to set the private class members in the class below: 1: public class Privates 2: { 3: private int privateInt; 4: private String privateString; 5: public int getPrivateInt() 6: { 7: return privateInt; 8: } 9: public String getPrivateString() 10: { 11: return privateString; 12: } 13: } An you can see there are no obvious ways how to set the members priv

Gradle and some notes on creating Java objects from JSON strings

This morning I spent my time commuting to work reading about a  Test-Driven Development Stack for Java . Tools mentioned were Maven, Jetty, Mockito, and JAX-RS. I wanted to learn some more about  Mockito  so I spent some time reading on their website where I found out about this build automation system called  Gradle  that can be used instead of Maven. Interesting I thought, let's try it out. So first things first. The Ubuntu repositories only contained a really old version of Gradle so I downloaded the binary distribution from the website. Installation consisted of the tricky task to decide where to extract the archive and set up my PATH to include the bin directory for Gradle. Then I thought that I wanted a plugin for Eclipse so I can create Gradle projects and have some parts automatically generated. After searching the web for a short while I found  Buildship  that  is a collection of Eclipse plug-ins that provide support for building software using Gradle. The easiest way

Parsing JSON in Java

My experience with Java is pretty limited. I took a Java course some ten years ago and professionally I have only been involved in one larger Java project. Therefore I thought it was time for a mini-project in Java. I prefer JSON over XML any day. Therefore I thought that a good mini-project would be to investigate the possibility to parse JSON using Java. After a few Google searches I decided to give Google's Java library  GSON  a try. GSON can be used to create JSON representations of Java objects and to create Java objects from JSON strings. I focused on the latter of these two. If you use Eclipse it is really easy to add the GSON library to your Java project. Just download the jar  and store it at a good location. Then in Eclipse, select the properties for your project and under "Java Build Path" -> "Libraries" press "Add External Jars..." and select the downloaded jar file. Here follows a simple test case using JUnit: 1: package se.th

Currying with Python

Currying is not something that I have used before. I encountered it recently during my dive into functional programming. So what is it, and can it be done using Python? I would describe Currying as a method to create specific functions by using a more generic function as base. If you are used to Object Oriented Programming (OOP) you can think of the generic function as the base class and the more specific function as the derived class. Let me show by example. Think of a function that multiplies every element in a list with a given multiple. This function would require two input parameters, the list and the multiple. In Python this could look like: def multiplyListElements(multiple, list): return [multiple*x for x in list] Now, imagine that you often want to multiply each element by three. You can do this by calling 'multiplyListElements(3, list)'. Or you can use Currying: def multiplyListElements(multiple): def f(list): return [multiple*x for x in lis

Being SOLID

In Software Development, what does SOLID refer to? SOLID is a set of principles for object oriented programming (OOP) and design. The five principles referred to are: Single responsibility principle (SRP) Open/closed principle (OCP) Liskov substitution principle (LSP) Interface segregation principle (ISP) Dependency inversion principle (DIP) To get a deeper understanding to what this means we have to go in to each principle, preferably by using examples. Since there are a lot of good comprehensive descriptions available online I won't write my own. Instead, I have collected links to good descriptions that are worth reading. SRP explained by Elizabeth Engelman OCP explained by Joel Abrahamsson LSP explained by Claudio Lassala ISP explained by Ricardo Sánchez DIP explained by Brett L. Schuchert

Not possible to submit assignments for "Functional Programming Principles in Scala"

If you plan to take the Coursera course " Functional Programming Principles in Scala" you should be aware that it is not possible to submit your tasks for automatic evaluation. All the course material including videos and tasks are available but you will not be able to verify that you have been able to solve the tasks correctly. I will however continue with the course. Not being able to submit is not a deal breaker for me since the tasks comes with pre-written test code making it possible to verify that your solution at least passes some basic functional tests.

Book review: The Software Craftsman

I just finished reading "The Software Craftsman" by Sandro Mancuso. Sandro is a sofware craftsman, author, and founder of the London Software Craftmanship Community (LSCC). He has worked on a number of different projects and companies ranging from small start-ups to large organizations. Software craftmanship as a term is something that I came across for the first time in 2013 when I signed the  Manifesto for Software Craftmanship . Around that time I also started reading books like "The pragmatic programmer" and "The clean coder" (both which I recommend by the way). Actually Robert C. Martin - the author of "The clean coder" - has written the foreword for "The Software Craftsman", in which he states that he felt like he could have written the book himself. And that's 100% true. If you have read "The Clean Coder" you will recognize most of the ideas and topics discussed. At least for the first half of the book. W

Surfing the web using only the keyboard

For quite some time I have been feeling frustrated every time that I need to move my hands from the keyboard to use the mouse. When surfing the web this usually happens all the time. Today however, I found a cure to this frustration, it is spelled Vimium. Vimium is an extension to Chrome that lets you surf the web using only your keyboard. Those of you that are familiar with Vim - the editor - will feel right at home. Others will learn the keys quite quick. And if you find yourself wondering which key that does what, just type '?' and Vimium will display a help splash screen with the most common keys and what they do. Vimium will let you scroll, click links, select and copy, etc just using your keyboard. To me this is big relief and I really recommend that you give it a try. Visit the Vimium homepage

Switching keyboard layout from Qwerty to Dvorak, is it worth it?

For the last two months I have been using Dvorak, or actually Svdvorak (Dvorak with a Swedish twist). The first two weeks or so were pure frustration. I literally had to force my fingers to press keys that felt completely wrong. Everyday I practiced using the site http://learn.dvorak.nl/ and slowly I became faster. Today, after using Svdvorak everyday for over two months I feel that my typing speed is pretty okay again. However, my accuracy is still quite bad. I would estimate that I type about 90 - 95% of the characters correctly. Which means that I have to erase and re-type almost every tenth character. Quite frustrating when you have been completely fluent with Qwerty for over 20 years. In summary, I will continue using the Dvorak keyboard layout, sooner or later I am sure that I will be totally comfortable with it, and already today most of the frustration is gone. However, if you feel totally comfortable with Qwerty today I would recommend that you stick with it. The big advan

Time for some functional programming

I have never really taken the time to really learn functional programming. In 2006 I took a course in Haskell but really never bothered to understand what I was doing. Now that I have been developing in imperative languages like C, C++, Java and Python - both profesionally and on my spare time - since 2008 I feel like it is time to give functional programming another shot. A couple of days ago I signed up for the Coursera course "Functional Programming Principles in Scala" that I will spend the upcoming weeks getting through. Besides that I also tried some Erlang and Haskell just for the fun of it. Will give a review on the Coursera course in a couple of weeks.

Source Code Formatter

I just found this nifty site: http://codeformatter.blogspot.se/ What it does is that it lets you paste code into a text box, which it then formats to something that you can copy/paste to your blog in order to have source code displayed in a nice way. Here is an example: 1: #include <stdio> 2: int main(int argc, char** argv) 3: { 4: std::cout << "Hello, world!" << std::endl; 5: return 0; 6: } Pretty nice right? Add a little syntax highlighting and we're all set.