Organize your thoughts

Posted by Filip Ekberg on September 25 2012 5 Comments

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):

  • Blank
  • Project Plan
  • Project Status Report
  • Project Dashboard
  • Organization chart
  • Short meeting
  • Meeting Manager
  • SWOT Analysis
  • Cause & Effect
  • Timeline
  • 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

Use LINQPad for more than LINQ

Posted by Filip Ekberg on September 17 2012 4 Comments

I like to spend time on StackOverflow and contribute by answering as many questions as I have time to. Many of the questions consist of code that doesn’t always work as expected. In these times I find that LINQPad is the perfect tool to use when you want to run the sample code or create smaller samples yourself for your answers.

Don’t be confused by the name!

Just because the name is LINQPad, it doesn’t mean it only does LINQ. Even if evaluating and running expressions is what it does best. LINQPad will allow you to run the following code types:

  • C# Expression
  • C# Statement(s)
  • C# Program
  • VB Expression
  • VB Statement(s)
  • VB Program
  • SQL
  • ESQL
  • F# Expression
  • F# Program

This makes LINQPad really powerful!

Best of all, there’s a free alternative with a little less sugar on it. I recommend buying a license to support this amazing developer tool though and it will give you autocompletion in LINQPad, which makes it even more powerful!

Running C# code

Let us take a look at LINQPad and what it looks like. Here’s what LINQPad looks like when you first start it up, it’s clean and intuitive:

By default, it’s preset to running C# Expressions, but you can easily switch between the different types of code snippets to execute in the dropdown menu:

In an expression, you can’t declare variables, think of it like you can’t add multiple statements. This is an example of a C# Expression:

new [] {11,20,33}.Where(x => x % 2 == 0)

We can execute this by pressing the green “run” button or by pressing F5 (as in Visual Studio). This will display a result of the expression as you would imagine any REPL would do:

Now let us assume that we have a more complex code snippet that we want to execute and we want to get information about variables along the way. LINQPad hooks in an extension to object which provides a method called Dump. This will dump information about the object that you use it on.

The more complex code snippet will be a BubbleSort implementation in C#. First we create a list of integers, order it randomly and then sort it using BubbleSort (side note: BubbleSort is the slowest sorting algorithm.).

To see that my items were actually sorted, I want to show the content of my list before and after it was sorted. To do this, I can use the extension method Dump() that comes with LINQPad. It will look like this:

This is the code that I executed:

var items = Enumerable.Range(0,4)
                      .OrderBy(x => Guid.NewGuid())
                      .ToArray();
items.Dump();

// Bubblesort: O(n^2)
bool done = false;
while(!done)
{
    done = true;
    for(int i = 0; i < items.Length - 1; i++)
    {
        if(items[i] > items[i + 1])
        {
            var temp = items[i];
            items[i] = items[i + 1];
            items[i + 1] = temp;
            done = false;
        }
    }
}

items.Dump();

This is a great example of how powerful multiple statements are in LINQPad. But there’s more, you could also execute an entire program and have multiple classes and methods in it. But for larger projects like that, I personally like to create a Visual Studio project instead.

Notice the different outputs that we can select as well. If we wrote LINQ, we might want to see the actual SQL that is executed and if we write a couple of statements we want to see the IL:

LINQPad can do much more than this as well, we can have it connect to a database to run queries against our data. We can also change if the code is optimized or not; if we want to explore the IL that is generated when using optimization contra when it is not.

LINQPad is awesome and I use on a daily basis!

Vote on HN

Visual Studio 2012 is now released to the public

Posted by Filip Ekberg on September 13 2012 1 Comment

On September 12, 2012, Visual Studio 2012 was released to the public and Microsoft of course had a very nice release event. As I couldn’t attend in person (it’s a 14 hour flight from where I live to Seattle) I as many others watched the live-stream from VisualStudioLaunch.com.

During the last 6 months I’ve had the pleasure to work with what is today known as Visual Studio 2012. This is (all colors aside) by far the best IDE that I’ve ever worked with. I’m of course biased since I’ve worked with Visual Studio since as far back as I can remember, but it’s truly been a great improvement since then.

Microsoft did not only announce all improvements and new features, they also announced that they will release updates to Visual Studio 2012 more often than what we have been used to before. The first update will be released before the end of the year and we will see a CTP version of this before the end of the month.

To get more familiar with all the new features that comes with Visual Studio 2012, .NET 4.5 and so forth, Microsoft has put a lot of effort into creating screencasts on each subject. These screencasts can be found at the Visual Studio 2012 Launch site.

Visual Studio 2012 Express versions

If you haven’t already downloaded and installed Visual Studio 2012, you should be sure to do so.

You can find the free Express versions here:

Another very nice add-on that Microsoft announced together with Visual Studio 2012 Express for Web is that you can now use F# in your ASP.NET applications. You can get the “F# Tools for Visual Studio Express 2012 for Web” through the web platform installer. Be sure to check out the F# Team Blog‘s announcement on this.

Let’s build great apps with Visual Studio 2012, happy coding!

Vote on HN