A couple of weeks ago I visited my old upper high school. This is where you take your last three years of high school in Sweden and focus on a certain area. I focused on IT and Programming and now a couple of weeks ago I was invited to come back and talk to the current students. My initial idea was to talk about programming and inspire these young people (16-20 years old) to continue studying in the field of software engineering. But when I found out that more than half of the attendees actually studied something else such as economics or entrepreneurship, I had to change focus of the presentation. The new focus on the presentation was entrepreneurship and how to become awesome at selling yourself.
I recorded this presentation, but since it’s in Swedish I will not bother embedding it into this post; it’s available on my YouTube channel for anyone that wants to have a look at it!
The questions for a Software Engineer
The students had put together a list of questions, 19 questions to be precise and most of the questions were aimed at me and my career. But I think that many of these questions are among the commonly asked ones, I’d like to share the questions and the answers with you all. So here goes, have an awesome Friday and enjoy the Q&A! If you have additional questions for me or any comments on the answers that I gave, please leave a comment!
When you started upper high school, how good were you at programming?
I was somewhere between 10 and 12 years old when I first saw programming in action. Back then we didn’t have fancy computers, of course they were fancy at the time but not as todays computers. I remember my best friend back then showed me QBasic and how to do basic input, conditions and output. So I just wrote some basic programs in QBasic that asked me a question over and over again until I gave it a certain answer.
This was fun and all, but it kind of stopped there. I didn’t have my own computer until I was 12 years old and at this time my friend had learned VB which I gave a try but never really got into it. I was young and my focus at that time wasn’t to become a programmer. I liked computers and I liked exploring them but the games on my computer was calling out to me.
As I was born 1987, being 12 years old puts us in 1999. We had no high speed internet at this time and some of the operators in Sweden actually charged per megabyte that you downloaded. So googling for video tutorials wasn’t really an option.
So let’s speed it up a bit, when I was 16 years old I started upper high school. I had chosen to become an electrician just as my father. But after 1-2 weeks I felt that something was missing, so I actually changed schools, mainly because the programming kids got their own laptops at the school. Up until now I had actually played a lot with computers so I wasn’t a completely newbie on that area. But my programming skills wasn’t that good and fortunately for me, they didn’t expect that in high school either.
This means that the short answer is, I wasn’t any good at programming at all when I started high school. I had tried some when I was younger, but that wasn’t enough. Eventually we started looking at HTML and this being static and all, I wanted some dynamic behavior in my web pages so I bought books and learned PHP. In the final years of high school we were doing C# and I were de-compiling the teacher’s examples and changing stuff and then re-compiling them.
Programming had by then became a part of what identified me and who I wanted to be.
What was the hardest part about writing/releasing your own book?
But if I need to choose one of the most hard parts about writing the book. That would probably be: handling all the input from proof readers.
The hardest part about releasing the book has been all the rules and tax stuff. Since I use CreateSpace which is a USA based company there are a lot of different rules regarding taxes that are very hard to get your mind around. I’ve spent countless of hours trying to figure all that out.
How did you experience studying in Blekinge (the county where I studied for my BCs in Software Engineering)?
This county is in the southern of Sweden and the town that I studied in is called Ronneby. It’s hard to compare this to any other cities that you might have heard about. This town (if you can even call it that) is so small that when you go out to buy something, you know Everyone and everyone knows you.
Ronneby changed my life, if I would have never met my wonderful girlfriend if I hadn’t moved to Ronneby.
The school itself is awesome, we had the highest number of researchers in the field of Software Engineering in Sweden.
Have you earned any money off the book, if so how much?
It depends on how you look at it. If you take all the time that I’ve put down on writing the content and then multiply that with whatever my time is worth. It would be so much that this book would have to sell as good as Harry Potter before I can say that I earned money from it.
The royalties are much better when self-publishing, but a lot of that money needs to go on additional marketing if you want to sell more books.
I didn’t write the book for money, I wrote it because I love what I do and I want to share this with everyone.
Why did you write a book?
There are so many different things that inspired me to write the book. A lot of the great authors that I met at NDC in 2011 and a lot of people that I’ve met in my career prior to that.
But the definitive moment that changed everything was when I applied for a job that I didn’t get. For some reason there wasn’t enough “evidence” that I was a good enough programmer for that position. This inspired me to write a lot more in my blog. I’ve focused my energy on other things before and I’ve always enjoyed talking and writing about programming and technology.
So I started writing my blog because I was inspired, sort of by myself, because I wanted to do more for the community and I wanted to share my experience and knowledge.
As I wrote before, there were a lot of reasons to why I started writing this book. Mostly inspiring has been all the people around me and the developers that I look up to.
How are the sales of the book going?
It’s going great! I’ve been selling around 70-100 books per month since it was released and all feedback that I’ve gotten has been very positive!
How do you sell the book and how do you market it?
I sell the book through CreateSpace. CreateSpace is a print-on-demand company that sells the book through different channels such as Amazon. It’s also available on Kindle and as an ebook bundle!
My girlfriend has bachelor degree in marketing, so I try to get as much help from her as possible on this. Lots of the marketing that I’ve done so far is the discounts that I’ve handed out and the books that I’ve raffled away.
Most importantly: Word of mouth.
Who read the manuscript during the writing process?
At one point I had 8 people that wanted to dedicate their time to read and proof the book. This was all during the writing process and after I had finished writing.
I’ve thanked all these amazing people in the Acknowledgement section in my book, be sure to check that out when you buy my book!
Do you have your own business, if so what type of business is it?
Yes, I’ve got a sole proprietorship.
When you started your own business, did you make an initial budget?
No. I should have made one though. A couple of years after I started my sole proprietorship I found out that it would have been better to actually know what money comes in and comes out in the long run. Everything worked out for the best though!
I really recommend you to do a budget and a business plan if you’re thinking about starting up something.
What kind of system do you use to keep track of all invoices and papers in your company?
I wrote my own system to create invoices. I was 18 years old when I started my sole proprietorship and I didn’t really want to buy a system for this since I could write one myself.
What is the best way to learn programming?
This is way too subjective to give one answer to. I learn best by being inspired by someone. It can be watching a video on Channel9 or maybe attending a conference where there’s all these amazing people talking about new and fun technology and how to use it.
If you like reading buy books. If you like listening watch screencasts. Nowadays there are ways for everyone!
What is the hardest part about programming?
Understanding the system requirements. The customer or whoever you talk about the system you are going to build with have one way of expressing what they want, when they really want something else. One of the biggest problems that is actually fundamental in domain driven design is that you need to speak the same language!
Why C#?
Why not?
Seriously though, C# is a living language as I call it. There’s a lot of changes happening to the language and how you work with it. If you look back at .NET 1.1 and compare the C# code from then to code from today, both of them are understandable and similar. But there are so much more help in the newer versions of C# that helps you write even cleaner, faster and easier to understand code.
Another important thing, at least for me is that I’ve always loved Microsoft. I’ve got a hard time staying away and not preaching their stuff.
What other programming languages do you know?
I started off with PHP when I was 16 and then I learned Java. From there I’ve learned to love some of the following: C#, C++, ASM (MIPS+X86), Python.
Probably forgot one or two languages but those are the ones that I would be comfortable doing projects in. I would probably have to do some reading up if someone threw a MIPS project in my face.
Do you have a role model?
There’s too many people that I look up to. My parents and my family has always been what drives me to do greater things.
In the profession there’s also a lot of great people that I look up to such as Bill Gates, Steve Ballmer, Eric Lippert, Steve Jobs, Scott Hanselman, Scott Guthrie, Jon Skeet and many more.
To be honest, I look up to everyone that loves what they do and do everything to share that passion.
How long did it take to write your own book?
If I include the time it took to prepare all the raw content, I think it lands somewhere around 2000 hours.
Do you also work as a Software Engineer or are you just an author?
I work as a full time Software Engineer at Star Republic in Gothenburg meanwhile as I have my own sole proprietorship and doing all the work with the book.
I’m a man with many hats and I like to have many projects in the pipe!
Will there be a sequel to the book?
Depends on who you ask. If you ask my girlfriend the answer is no.
All joking aside, she supports me in writing another one but currently I am focusing on C# Smorgasbord and everything that is needed to be done after a release of a book.
I’ve got plans for more books, but time will have to tell what happens.
End of Q&A
I really hope you enjoyed reading these Q&A’s, I sure did writing them!
Have you had a chance to play with SignalR yet? If not, you’re really missing out! While preparing for a Swedish .NET User Group presentation, I did a test screencast on all my content that was going into the presentation. This screencast is uploaded to youtube so go check it out! It’s a bit over 1 hour long but well worth it if you want to get started with SignalR or just get some new inspiration!
If I would have gotten a penny for every time that someone told me or tweeted: “I want the old start button back in Windows 8!” I would have been richer than Bill Gates. First of all, the problem is that people seem scared of change, not willing to step out of their comfort zone and try something different. I’ve been running Windows 8 since February 2012 and I’ve come to love it a lot. Despite the lack of the old start button, I still find the operating system much more productive than before and it’s very intuitive!
Windows 8 doesn’t lack a “Start button” but they’ve replaced the old one. Install a tool like Start8 is like painting a new red Ferrari F50 as a rainbow; simply not by design.
Windows 8 has different use-cases
When I attended //BUILD/ Microsoft gave me a very nice Surface that I really like and what I like the most is that the transition between a tablet and a desktop computer is an awesome experience. I use the two devices completely different but still feel like home when using both of them. I rarely go into the standard desktop mode on my Surface, I only do so when I need to do some Word-processing or just manage files and on my Workstation I rarely go into the new Start screen (Modern UI), I only do so when I want to use the very powerful search.
There’s a Start button on Surface and it’s required by all vendors as far as I know that it’s there. This hardware button is one of the replacements for the old start button!
I don’t really use that so much because I find it much easier to just swipe from the right and get another start button. You can also press Win + C to get to this menu and you can also bring the pointer to the right corners to get this menu showing up!
So far there has been four ways to get a start button showing up which brings you to the new powerful start menu. The hardware button can easily translate into the keyboard start button and the swipe from the right is the point in corners version.
However, that is not it! There’s actually another way to show a start button, which also dictates where the start menu will show up.
How do I know where the start screen shows up?
I’ve heard people saying that they think the behavior of where the start screen is showing up is random, but frankly it is not. If you have a Modern UI application running on Screen 2, this is where the start screen will show up. If you move the application to Screen 1, that is where the start screen will show up.
But if you don’t have a Modern UI application running, what then?
Use the start button in the corners!
This start button shows up when you hover the different left bottom corners on any of your monitors and it will bring up the start screen on that monitor.
So you were saying there’s no start button? The old start button is gone, the old start menu is gone. It has been replaced by something much more productive and intuitive, step out of your comfort zone and just adapt to it!
It’s all about HCI (Human-Computer-Interaction) and making the experience better for everyone, but it takes time change an old behavior. Why do you so eagerly want the old start button/menu back?
C# Smorgasbord has been out for 3 months and has already gotten a lot of positive feedback and great reviews(See below)!
To thank you all for your support, I’m giving away a discount code for 35% discount on C# Smorgasbord!
This offer is for a limited time only, the discount will be available from November 20, 2012 to December 31, 2012!
The discount code works only on CreateSpace; this is where the book is printed. CreateSpace is a DBA of On-Demand Publishing LLC, part of the Amazon group of companies.Buy yourself, your spouse or your kids an early Christmas present!
Discount code: N9UV3WDP
Note that the Discount Code only works on CreateSpace!
The printed copy includes access to the ebook bundle; so you don’t need to wait for the printed copy to arrive. After you’ve purchased the book just fill out the form on the book’s website! CreateSpace ships globally and their shipment times are in most cases a lot shorter than what it says in their website.
Looking at everything from testing strategies to compilation as a service and how to do really advanced things in runtime; you get a great sense of what you as a developer can do. By taking his personal views and his personal experience, Filip digs into each subject with a personal touch and by having real world problems at hand, we can look at how these problems could be tackled.
No matter if you are an experienced .NET developer, or a beginner, you will most certainly find a lot of interesting things in this book. The book covers important patterns and technologies that any developer would benefit from mastering.
Table of Contents
Introduction to Parallel Extensions
Productivity and Quality with Unit Testing
Is upgrading your code a productive step?
Creating a challenge out of the trivial tasks
Asynchronous programming with async and await
Dynamic programming
Increase readability with anonymous types and methods
Even if you find the right tool for your job, do you know how to use the tool correctly?
This is exactly what I want to talk about this Friday; you need to know your tools in order for you to know it’s the right tool for this job!
Do you know your tooling?
All too often I see developers using amazing new tools but in many cases not knowing the limits or how to use it correctly. It’s very important to understand how to use a tool and what the implications of using a tool in a certain way has. When I find a new tool or a new library that I want to use, I try to research it and understand it before I recommend it for production use.
To me a tool is not only a software that I run or a hammer that I use, but I also consider a third party library a tool. A tool for me is something that I use to solve a certain problem and smaller parts can build a larger tool.
Problems with not knowing your tools
If you don’t know what your tool does behind the scenes you can get very big problems in the end. If you try to use a hammer to screw something into the wall there might be an easy work around just to hammer the screw into the wall. But what if it was the other way around?
Imagine that you had a screwdriver but a nail that you had to put into a plank; getting that into the plank would be much harder, no?
It’s still possible of course to solve the problem by just using the other end of the screwdriver and hammer the nail slowly into the plank.
So where am I going with this?
If you use a library or software that is new and hype which solves a certain problem but makes it harder for you; maybe you’re doing it wrong! The tooling might be great for solving one of the problems, but the way that you use it just gives you too much of a headache. If you go back and do some research on the tools, you might find that you are using it wrong or that the tool simply is not for the specific use case.
A good example here is LINQ to EF. I’ve seen many developers knowing how to use LINQ but not knowing what happens behind the scenes. This can be very dangerous for the performance of your application.
One other problem that arises with this is that most of us test our applications with very little data in it, but in a real world application after some time there might be a lot more data to process which was not considered at the beginning.
Now to be a bit more concrete, see of the following LINQ to EF query:
var persons =from person in db.Persons where person.Name.Contains("Filip") select person;
This can of course be written like this as well:
var persons = db.Persons.Where(person => person.Name.Contains("Filip");
Both of these will be executed as soon as you request the result by doing persons.ToList(); for instance.
This all looks very good, it might be exactly what we want to do as well. But what happens if we have 1 billion persons in our database?
The SQL query that is generated from this will perform what is called a row search, which means it does not use any indexing which means it will have to go over 1 billion persons and do a search within each person’s name.
Consider that it generated the following SQL:
SELECT*FROM Persons WHERE Name LIKE'%Filip%';
Of course we can optimize this by using full text search! But that is not the point, the point is that we might not have considered that Contains() will actually be a slow operation to run. If we knew that this would skip all indexes we might had chosen to use StartsWith() instead.
Another problem with not knowing how LINQ works internally is that all too often I see developers doing ToList() just because they want to use the types in .NET instead of having it translated to SQL. If they had known of EntityFunctions or SqlFunctions they might had chosen to run the query on the database side instead of doing LINQ to Object!
Because if we perform the query below, we will actually fetch the 1 billion rows from the database and have them in memory and then perform the search in the application instead.
Last week I shared the first part in a very interesting session that I had the pleasure to do with Patrick over at NDepend. Having readable code and manageable solutions is very important but in some cases small changes that might see, trivial to you, might not be as trivial to someone else.
If you had to keep track of all dependencies in your head you are not going to have anything else on your mind; which is a pretty bad way to distribute your brain! Instead of keeping it all in your head, you can use a tool like NDepend to find out a lot of interesting things about your projects. If you’ve seen the previous posts and videos that I have done on NDepend, you know what kind of power this tool delivers.
The webinars that I have had the pleasure to do with Patrick has been very educating and I hope you like them as well, I would love to get some feedback!
So this week we are going to dig deeper with NDepend and spot dependencies, dependency cycles and spaghetti code! As we look on mscorlib, you can see that in some cases bi-directional dependencies are by design, but in other cases it might have been accidental. Sit back and enjoy the two parts below!
Yesterday was the first day of //BUILD/ at Microsoft Campus in Redmond, Seattle. There has been a lot of expectations on Microsoft for this event and boy did they deliver! The past year has been all about Windows 8, Windows Phone 8 and the very awesome updates to Windows Azure. //BUILD/ this year follows in its predecessor´s footsteps and deliver information about how we can write awesome applications for both Windows 8 and Windows Phone 8.
Me and my colleague from Star Republic arrived in Seattle a couple of days before the conference started to avoid being jetlagged during the session and be able to see a bit of Seattle. Despite all the rain in Seattle we have had a very nice visit so far. We’ve been able to see the Space Needle, the underground (which is awesome by the way), the harbor and much more. I really enjoy Seattle, maybe it is because it feels pretty much like Gothenburg. What’s best about it though is that it is flooded (not with water despite the rain) with geeks.
The days before the conference I had a chance to meet up with Scott Hanselman and a lot of the other amazing guys working on the ASP.NET team. If you haven’t seen the Day 2 Keynote the next part of this sentence is going to be a spoiler; I’m somewhat in the keynote! When I met Scott he needed material for his presentation, me and some other guys’ danced Gangnam style for him which was recorded and put in his and Scott Guthrie’s presentation. I don’t have the video available at the moment, it’s going to be available on C9 as soon as the keynote is uploaded. I recorded a little with my compact camera, but I forgot to bring a cable for it and unfortunately the Surface RT don’t accept an SD card!
All that was day two, besides for the actual recording, so up until now everything has been awesome. The sessions were all similar to the ones that we have seen over the year since last //BUILD/ but now that everything is shipped it’s more hands-on examples. I attended a couple of sessions about Windows 8 development with HTML and Javascript (and of course CSS). The most interesting session was the one about optimizing your web application by thinking about CPU usage. There are some very interesting tools in the Windows SDK that you can use to analyze the performance of a web application. Basically in most applications on the web, time is spent on waiting for resources to be downloaded which means it could be done asynchronously if possible and the other thing that is common is slow javascript with lots of DOM access.
As an attendee the highlight of the day was when Ballmer announced that everyone is getting 100GB of SkyDrive! I am actually going to swap from DropBox for a while to see if it is better or not. However that awesome present wasn’t enough for Ballmer so he also announced that everyone attending would get a Surface RT 32GB! When everyone calmed down and promised to write awesome apps for Windows RT, the VP for Nokia comes out on stage and gives away a Lumina 920 to everyone attending the confidence. At this time I wanted to lay down on the floor and cry of happiness. This was announced in the morning so we had to wait for our awesome devices for the entire day!
As soon as we picked up our stuff we went back to the hotel and I recorded an unboxing (I know most people hate those!) and hands-on.
Are you planning on getting a Surface?
I’m having high hopes for the ASP.NET session and hoping to see some things that will help me in my daily work. So far the Azure upgrades with Mobile Services and Add-Ons are Very promising and I am really looking forward to playing with it more. What is funny is that Halo 4 that is being release in the next months or so uses Azure a lot which forced them to rethink the server architecture.
Speaking of games, since everyone got a voucher for the company store which has heavy discount, I might grab an xbox controller to use for my next Windows 8 game. Do you have any experience with that? I would love to hear about it!
If you’re at //BUILD/ be sure to look me up and say hello and if not, just ping me!
Before we take part, I just want to say that I wrote this entire post on my Surace with the TouchCover. Takes some time getting used to.
Filip Ekberg is a Senior Software Engineer working in the country with all the polar bears, author of a self-published C# programming book and overall in love with programming.
Check out my recently published book.C# Smorgasbord covers a vast variety of different technologies, patterns and best practices that any C# developer should master.
All printed copies include access to the e-book bundle (PDF, ePub and Mobi!).