Welcome to this week’s Friday with Filip!
Earlier this week I wrote about how to organize your thoughts by using tools such as Evernote and XMind. Both of these are very easy to work with but are somewhat limited to getting your thoughts into a persistent format. Since productivity is important to all of us, I wanted to spend this Friday on exploring more tools that can be of great use to primarily developers. We live in an era where everything needs to be done as quickly as possible, with the highest quality and costs as little as possible. This can pose as a problem in many cases because they don’t quite fit that well together.
In my previous article, Let’s write better software, I discuss how we’ve been entering a world with more and more hardware and software; whereas bugs are more an expectation than an exception. This is of course a big problem, since we all want bug-free world. As many have pointed out though, the biggest problem are the people that are unwilling to pay for quality; of course, that’s not the way it’s sold. In many cases it’s either getting the contract or not getting the contract which can lead to doing the same thing within a more narrow time period.
Before this get’s out of topic, let me explain why this is about productivity. When we need to do something faster but still maintain the same amount of quality. We need tools to help us with analysis, suggestions and in programming we want help with refactoring. Without such tools, we would be less productive. This expands over many areas, not only development.
The right tool for the right job
This week I want to be more concrete and give hands on examples on what tools that I use in my day-to-day work environment. Feel free to leave suggestions on what productivity tools that work best for you and for your team.
There are a couple of areas where I try to be as productive as possible (of course I always want to be productive!):
- When I’m in a meetings
- When I’m coding
- When I follow up on a bug
As I stated in my previous post organize your thoughts, I use some tools to get my thoughts down quickly. But it is also important when you’re meeting with a customer or a college and a bug is presented, this needs to be documented in a good way.I’ve been using Pivotal Tracker for a while now and I like it; I would however like to give TFS 2012 a fair chance.
Pivotal Tracker allows us to track development, bugs, ideas and both give the project members and the customer a great overview of the project progress. This together with Evernote and XMind is very powerful and gives me a total set of powerful applications to use in a meeting.
Another tool that I like to use, which makes my understanding of a system better, is balsamiq mockup. This mockup tool lets you create nice overviews of how the UI will look when the system is done. When you’re brainstorming with your customer around what the UI will look like, this is a very productive tool to have in your collection.
When we’re done with a mockup, we can simply save it on the corresponding bug, task, feature or idea in Pivotal Tracker.
When I’m coding it’s very important to me that my tools are not in the way of my development. For instance, I don’t want a lot of non-natural keystrokes or popups to use. I’ve been swapping between ReSharper and JustCode.
When using ReSharper I get a lot of nice instant feedback on what I can do to improve my code, this makes it easier if someone is going to review the code at a later stage:
JustCode supplies the same amount of keyboard mappings, analysis and refactoring capabilities but one other thing that it provides is a way to stick a cheat-sheet on your desktop. This makes it very productive when I need to get use to some keyboard shortcut:
If you want to code productively, here are some recommendations:
- Spend a while analyzing what keyboard shortcuts your IDE provides
- Use productivity tools such as ReSharper and JustCode
- If you’re using Visual Studio, learn how to use Snippets
- Use a source control that is not in your way
These might seem obvious, but adapting to these sure helps me being productive. If I can solve a problem faster with just as much quality, I can spend the additional time that I just won on making the solution better.
What are your recommendations on being productive?
Vote on HN
Technology have been a big part of my life ever since I was a kid. If it wasn’t a console it was a computer and later came the mobile phone. All these things running on electricity have always interested me. My first mobile phone was a Nokia 5110, which is the only phone that actually never broke.There’s a joke around the net that the old Nokia phones never broke and that’s very true; however they didn’t do much more than calls, sms and snake.
When the phones with color displays appeared the mobile vendors noticed that people wanted to switch phones often; as soon as a new feature was released everyone had to have it. The vendors immediately started pushing out more and more phones, a lot more phones than were actually needed on the market. With this overwhelming amount of mobile phones and rapid development came a lot of more bugs.
Since I swapped from my first Nokia phone, I haven’t had a single phone for more than 1 – 2 years. This isn’t because I really needed to get a new phone but because after a long period of time it started feeling slow, less responsive and lacked all the cool features the new phones had. If the consumers want to buy new phones every second year, why should the vendors make phones that work for more than 2 years?
This has gotten too far, I’m not talking about the mobile phones but technology in general; the consumers are expected to change their behavior and their hardware/software often (every 1-2 years). What’s scary about this is that I’ve caught myself saying:
Oh, you’ve got the 2 year old version/model. That program/accessory doesn’t work on that version/model. You need to upgrade.
As consumers have somewhat adapted to this and expect rapid updates for software’s. The vendors no longer need to spend as much time on finding bugs as they did before. A very good example of this is the launch of Diablo 3 where Blizzard needed to push Diablo 3 to the customers without it being completely finished. If you played Diablo 3 when it first arrived and play it today, it’s almost as you play 2 completely different games; the story the same, but other things have changed.
It is not rare that vendors have open-betas of their in-development software or hardware. In Office 2013, Microsoft added an “instant feedback button” and this is Great! However, I’ve seen a lot of software’s where they “forgot” to remove the “report a bug”-button in the RTM (release to manufacturing). Of course it should be easy to report a bug once you find it, but nowadays it’s pretty much like the vendors expect the users to find bugs and that they need rapid ways to report these.
We no longer see bugs as exceptions, but it’s rather expected and when we do find a bug we immediately think “this will be fixed in the next version sometime this week”.
Stop delivering less than awesome software
We’ve seen that consumers are not scared of changing their behavior, as that’s what we do; we adapt. Vendors need to start delivering better software and hardware!
As a software engineer, I know what I can do to ensure that each piece in the software that I create is high quality. If you don’t feel that you’ve done an awesome job, something is wrong; we need to be proud of the software that we deliver!
It’s quite often that bugs derive from “quick fixes”, but a quick fix can turn into a quickly evolving bug.
Here’s what I suggest we do to ensure quality of things we deliver:
- Test, test and TEST!
- Refactor your code according to the programming guidelines of the language your using
- Write documentation (even if short!) about your methods, flow and functionality
- Write test documents which includes both manual and automated tests
- Create automated UI tests
- Run complexity analysis tools such as NDepend on the code base to find too complex areas
- Don’t deliver if you’re not happy with the outcome
- Write readable code
- Don’t try to optimize better than your compile can by writing complex and un-readable code
- Drink a cup of coffee before you deploy
Let’s make better software, together!
What’s your suggestion on ensuring that we deliver high quality?
Vote on HN
Organize your thoughts
Do you get a lot of ideas when you go to bed, that you forget in the morning?
I sure do and I know that this is very common. The reason that I’ve got explained to me is that because when we go to bed, we relax our entire body & mind. When doing so we also start reflecting upon the day or even week that has passed so far; subconsciously.
At least for me, seconds before I actually fall asleep (last thing that I can remember) I get the best ideas but often I lack things around me to get these thoughts on permanent record.
As I live, love and work with code this is where most of my ideas orbit. But occasionally I get other ideas as well, things like where I want to travel, what I want to see and what kind of changes I like to do in our home.
Last year, I attended NDC (Norwegian Developer Conference) and I somehow got to join the speaker/staff cruise. At this party, I met a lot of very interesting people and one of them gave me a very good insight into how he captures the moment; he always has a pen and some paper in his pocket. On these papers he writes all kinds of interesting ideas, suggestions and anything else that you can imagine.
As I hate “analog” writing, I didn’t really like the idea of carrying pen and paper with me everywhere, but the idea was great; I just had to find something that worked for me. I’m still in the process of finding exactly what works best for me!
Finding the right tools
There is something that is always by my side, everywhere I go and it would be awesome if this accessory could have an easy way to log thoughts on. Of course, I would want to be able to access these thoughts anywhere, even if I drop the accessory.
I’m of course talking about my smartphone and storing the content in the cloud!
As for just writing down my thoughts, taking photos and storing smaller portions of information; I tend to fall back to evernote. This is by far the best application that I’ve used for rapidly store notes in the cloud!
Here are some reasons to why I use Evernote:
- It’s easy to rapidly create new notes/images
- There’s a free version!
- It works on all devices (PC, Mac, Android, iOS, Windows Phone)
Since I always have my phone with me, no matter where I am; I can instantly add a note with my most recent ideas. Then it’s of course up to myself to actually follow up and checking my own notes now and then.
This is what the PC version of Evernote looks like:
One very cool feature is that you can actually search inside both your notes and your images! If there’s text in images, Evernote will be able to find that!
Mapping your mind with a mind map!
Up until recently I felt it was difficult keeping track of all my thoughts that I had in meetings together with all the feedback from customers and co-workers. This is because either I put everything in a text document using Notepad or an Excel spreadsheet. Neither of these two alternatives have been very fun to work with. Another problem is also that it’s not quite so fun sharing just plain text with your co-workers or customers. So I wanted to find something else that was fast and that gave me great possibilities at the same time.
I actually stumbled upon a software called XMind, which is a tool for creating all sorts of diagrams. Best of all, there’s a free version! It doesn’t include all the fancy export possibilities or some of the more interesting modes; but the free version sure does the job well enough!
XMind can be used to create the following diagrams (more can be downloaded):
- Project Plan
- Project Status Report
- Project Dashboard
- Organization chart
- Short meeting
- Meeting Manager
- SWOT Analysis
- Cause & Effect
- Make a Decision
- Weekly Plan
As you can see by the image below, there are a lot of very nice diagrams that can be created.
When I just want to brainstorm and get my thoughts organized, I create a Blank document and just start adding nodes. By pressing Enter/Tab you create a child to the current node. So if you double click the first big blue box in the middle and name it, press Enter and then Tab, it will create a child to that.
You can see on this image below that I’ve created a map over what I have and want to write about and then added sub-sections to each topic to make it easier for me to remember what I want to write about.
The alternative that I used before is not as nice and does not provide as good of a overview. This could as mentioned above have been doing it in a notepad document, spreadsheet or even the built in Sticky Notes application in Windows.
I think it is very important that we find good ways, especially ways that we are personally comfortable with, to keep track of our thoughts and ideas. It might feel a bit unusual to start, but stepping out of one’s comfort zone can lead to something very good.
It’s a great feeling being able to enter a meeting, taking notes and directly after the meeting not be ashamed of sending your mind map to your co-workers.
How do you normally organize your ideas and thoughts and what tools do you recommend for taking notes during a meeting?
Vote on HN
In the previous post we looked over an introduction to the C# Interactive Window that comes with Roslyn, now let’s have a look at some things in the c# interactive window that will increase your productivity! I want to thank Kevin Pilch-Bisson ( @Pilchie ) for pointing some of these things out.
One question that arise when I showed off the C# Interactive Window at work was: This looks great, but can we use types in our current solution?
Yes, you can and this is one of the things that I think makes this C# Interactive Window very powerful. Here’s how you do it, go on about your day, coding your classes and when you want to fire up the C# Interactive Window you can just right click your solution and select “Reset Interactive from Project” like this:
Now this will bring up the C# Interactive Window like this:
As you might see here you can reference assemblies by writing
#r <name> and then import the namespace by writing a using-statement. You can experiment a bit with it, try writing the following:
> #r "System.Windows.Forms"
You could also do it like this:
> #r "System.Windows.Forms"
> using System.Windows.Forms;
Now this is pretty powerful, because now we can do live testing on our objects with intellisense without actually adding or changing anything in our solution. As I said in the previous post this is nice when you want to test code out and play with it. Let’s say that you’re completely new to a project, it lacks good documentation and sure you see all the code files and you can navigate around inside them to learn about them, but how do you test everything out?
You can write tests for yourself, compile, run test and do that over and over again or you can fire up the C# Interactive Window and start playing around.
Have a look at this, I’ve created an instance of my Person class and then I check if the instance is null or not and instantly the result of this expression is printed out (hence REPL). We also get intellisense on our classes which makes exploring and working with the interactive window a blast!
I hope you found this interesting, if you have any thoughts please leave a comment below!
Vote on HN
I often find myself wanting to explore new options and see what is possible to do and what is not, at other times I might really need to test something fast just to see if my concept will work. In the past I’ve either created a test for this, mocking the stuff that I need and then finding myself debugging the test. Or I just write a method and use my test-extension to invoke the method that I right click ( cool feature from TestDriven.NET ).
While both of these tend to work out very well and the first one might even be a good approach, since we all want 100% code coverage! But, what about the times when you just want to explore something or just test something out? If you’re an F# developer you might have seen the F# Interactive Window that looks like this:
With this we can explore F# and write code that is evaluated directly, this is called REPL which is short for Read-eval-print loop. This means that we can create statements like this
And then it will print:
Which means it will look somewhat like this in your F# Interactive Window:
I can tell you, this is very, very, very(!) useful at some times, I found myself wanting to test a regex in a couple of different ways and having an Interactive Window like this is very helpful. The above is for F# and is built into Visual Studio, but what about a C# Interactive Window?
Out of the box, there is none. But if you install Roslyn ( which is a CTP at the moment ) you’ll get one! You’ll find it just below the F# Interactive Window in:
View -> Other Windows -> C# Interactive Window
The C# Interactive Window looks very much like the F# one:
You might have notice that I haven’t said that you need to create a new project, this is because you don’t have to, you can just fire up Visual Studio and start playing around in the C# Interactive Window! Now let’s see what this baby can do!
We can start off by checking the help, you do this by writing #help and pressing enter, notice while you write that you have intellisense here!
The help-text isn’t that long, read through it and understand the different key-shortcuts for executing segments of code. There is another built in command that you might find useful and that is “cls” which for all you none-DOS-aware people is short for “clear screen”. All the built in commands are executed by writing a leading “#” so to clear the screen, simply write the following and press enter:
Now let’s see if we can download the contents for this blog using a WebClient, if you start off by just writing
var client = new
You’ll see that
WebClient isn’t known where and we get a underscore below the W which indicates that we can press ctrl+dot and import the namespace!
Once it is imported, it will look like this:
Now let’s download some data! Add the following on the next line:
var data = client.DownloadString("http://blog.filipekberg.se");
When you press enter, the statement will be executed and this might take a couple of seconds. Notice that nothing has been printed out or evaluated yet and by that I mean, in the F# Interactive Window after each statement you got some data printed out about what the last statement generated, that’s not the case in the C# Interactive Window, but! If you write the name of the variable we just created, you’ll see something pretty cool!
Here’s a final example of what you can do:
I think this is a very nice tool to use when you just want to try stuff out, I found myself wanting to try some different regexes so I fired up the C# Interactive Window and started testing and the easiness of just dumping out what stuff is, it’s pretty neat!
I hope you found this interesting, if you have any thoughts please leave a comment below!
Vote on HN
This is by far the most asked question I’ve seen around the net besides the obvious questions like “How do you do X and why doesn’t Y work?”. There is a simple answer: If the code works and is patchable, we don’t need to rewrite.
I’ve heard that line countless of times from both customers and PM:s when arguing about rewriting old systems and to be fair, it’s not an invalid statement. Why should be re-build something when it is properly working? In my opinion there are a couple of reasons why you would need to consider rewriting code that is working.
- The old framework has security issues that will just take to much time manage and there will be to many “fast fixes” in the code so that in the near future, it will be hard to handle.
- It’s hard to implement new features and integrate with new systems that the customer requests.
- There are too many new developers on the team that do not have knowledge regarding the older framework and it will therefore be beneficial to rewrite.
One might argue that some of the above will count as “the software does not work” since it’s not manageable anymore. And to be honst, to old code is hard to manage and costs more than it needs to. For instance, Microsoft recently said that they will stop supporting VB6, hello? It’s 2010 and we still develop VB6 applications and manage old VB6 applications.
I am not trying to say that the VB6 code that was written is bad or that it will be cheaper right Now to rewrite but in the end I think it could somehow benefit both the developers and the customers. Visual Basic first appeared 1991 and version 6 which has been the latest Visual Basic version outside the .NET family was released as a stable release 1998. That’s 12 years ago, how much really happens in 12 years?
12 years ago I got my first computer which had a Pentium 2 CPU with 350Mhz and less than 128MB RAM doesn’t that say just a little bit how far we’ve come since 12 years ago? Today you can get a 6 core CPU with over 4Ghz and a lot of gigabytes of RAM.
Put that in the context of programming, it’s been 12 years of security fixes, system updates, patches on developed systems and the biggest change of all: A bunch of new Operating System updates with a couple of major releases. Well I am not here to bash down on VB6 but to reflect a bit on if it is really worth upgrading to a newer framework.
What if you have a system written in .NET 2.0 with C# using ASP.NET ( WebForms ) will it be worth the effort and money to upgrade/convert this system into .NET 4.0 with MVC 3? I’d sayd: It depends!
First of all you need to think about how it will benefit the customer. If you have a comittment to the customer and handle all upgrades and new development, maybe you will get a lot more features for a much less cost if you use a much newer framework, because in a new framework you get a lot of help solving trivial problems.
So in a longer term you might actually help the customer reduce the administration cost, but the up-front cost might be a bit higher to just get you and your team over the cliff to a finished upgrade.
The answer to this is quite subjective and I still think that it depends a lot on the project and that you need to think about how it will benefit the customer or the development team. A while back I answered a question on StackOverflow about the current topic, the poster wanted to know if it was a productive step to rewrite from Language A to Language B and my answer was:
You need to take some parts into mind here,
- What will you gain from re-writing
- Is it an economically wise decision
- Will the code be easier to handle for new programmers
- Performance-wise, will this be a good option?
These four points is something that is important, will the work be more efficient after you re-write the code? Probably. But will it be worth the cost of re-development?
One important step to follow, if you decide to re-write, make 3 documents, first Analyze the project, what needs to be done? How should everything work? Then put up a document with Requirements, what specificly do we need and how should this be done? Last but not least, the design document, where you put all your final class diagrams, the system operations and how the design and flow of the page should work.
This will help a new developer, and old ones, to actually think about “do we really need to re-write?”.
[ read the entire thread here ]
What I did there was what I try to do here, I answer with a follow up question:
- What is the current situation in your project?
- Do you Really need the features in the new framework/language?
- Is the language the system is built in out-dated?
- Will it be easier in the future to integrate to new systems if you upgrade?
If you can check at least two of the above listed points, you really should consider upgrading your system.
Vote on HN