Daniel Saidi's Blog
Oh, my f*****g GOD, I was not prepared for this.
The creativity evangelist Denise Jacobs coaches people in the tech field through
creativity. In her keynote, she talked about creativity, betterness and habits.
She’s a pro-speaker, meaning that her presentation is more or less what you could
expect from an “American motivational speaker”. Professional, but so streamlined.
Interesting, but leaving you with a feeling of “what did she say…really?”.
This nice talk on mobile security by Siren Hofvander kicked off with some general
good-to-knows, like how a cell phone is lost every 3 minutes. Adding this to the
fact that 3 of 4 companies allow BYOD (Bring Your Own Device), a lot of sensitive
information can get lost to the public, if you ignore to secure your information.
Before I start writing about how perfect this session was, first some background
I am very excited about the new Ubuntu Mobile platform, despite not being a Linux
or Ubuntu guy.
My fourth session of the day was a case study from Sirius International, where my
old colleague Jon Gyllenswärd and friend and Jimmy Nilsson from factor 10 talked
about a two year long change process they managed together. The process involved
a complete system redesign, moving to a business optimal code base, cross functional
teams and, sometimes controversially, always choosing the simplest solution possible.
This session was interesting and required a lot of attention, which made it hard
for me to sum it up properly. The abstract explains what the talk focused on:
In this session, Christian Horsdal talked about layers, carefully to distinguish
between layers (logical) and tiers (physical).
In an iOS app of mine, that I made with friends,
we had a situation where the app shut down after taking a couple of photos.
Unlike Apple’s outstanding OS X experience, Microsoft really have to step up the
Windows user experience. If you are going to charge a lot of money for people to
use your os and require them to activate their copy of Windows, you need to make
this work. Not work good, just plain work.
When working with git, I have mainly used a single SSH key pair, which I use for
If you want your apps to have an identity of their own, you should put some time
into adjusting the default appearance, such as fonts and standard iconography.
I am using Google Maps in a couple of iOS apps that I have created. Or, at least
I was before Apple threw out Google Maps and put in their own. So, now I guess I
am using Apple Maps instead.
In a current project, we are auto-creating deploy packages of an ASP.NET MVC web
site, using Team City. When we do, we need to perform web.config transformations
so that a properly transformed configuration file ends up in the package.
I am working on an iOS app that is powered by an ASP.NET MVC 4 admin system that
uses Entity Framework Code First with auto migrations RUNNING on App Harbor. The
project also involves a web site for presentation and information.
I recently updated OS X Lion to OS X Mountain Lion on all my personal computers.
The installation was smooth, but afterwards some things did not work as expected.
My third and final day at Øredev 2012 offered some really nice talks, as well as
a really crappy one.
My second day at Øredev 2012 was amazing! When it was over, I had to sit down and
take it all in. There were so many great talks, and I still had to skip many that
I wanted to see.
Inspired by my trip to Oredev and all the great devices and presentation, I have
finally installed Windows 8. I decided to upgrade my Windows 7 installation, and
found the installation to be very quick and painless.
I am happy to once again attend Øredev in Malmö, Sweden. Thanks, Cloud Nine, for
sending me here. Three days with great speakers and nice friends is just what is
needed in the dark, Swedish November.
I have an app with a main menu, where users can swipe horizontally through a set
of large icons that each take the user to a certain part of the app. When an icon
is tapped, it bounces, plays a sound, then takes the user to that particular part
of the app.
This post will show you how to localize your iOS apps, so they can be translated
to several languages. The post will describe how to translate plain text and how
to create localized versions of your storyboards.
Earlier this summer, the NDepend team released v4. I have been meaning to try it
out for some time, but life (summer, sun, vacation…hey, we Swedes live in snow,
cold and darkness for like 3/4 of the year) and some projects got in the way.
I am currently developing a location-based app for iPad and iPhone. This is how
I am building an app that uses ARC (Automatic Reference Counting), which means I
from now on will not have to handle memory management as actively as I have done
before. There are still things you have to consider when using ARC, but it makes
memory management a lot easier and less tedious.
I am currently creating an iOS app that will share data using JSON. Working with
JSON is trivial in iOS 5, since there is now a great, native JSON serializer and
deserializer. It works well, but I find it tedious to write all the required code
for creating and parsing JSON data over and over again.
I am currently building an iOS app that uses core data for data persistency. All
works great, but as I started adding data and retrieved entities sorted by name,
I noticed that the sorting did not work as I expected. The objects came out in a
The second and last day of DevSum featured some great sessions. Some were really
challenging as well, especially for a parental leave douchebag like myself :)
Today was first day of DevSum 2012, in central Stockholm. This is a short sum-up
of the first day.
As you probably have noticed, this is a code-oriented blog. Sicne I post a lot of code,
I have been annoyed for a long time, that the code has been terribly formatted.
I am currently developing an iOS app that will make use of the device camera. It
works really well, but since I am also running this app on the simulator, I want
to be able to select pictures from the photo library as well.
I am currently working with a new version of a hobby console application project
of mine. The app will execute certain actions depending on the input arguments.
When developing my NExtra library, I used to handle the release process manually.
Since a release involves executing unit tests, bundling, zipping and uploading to
GitHub, creating new git tags etc. the process was time consuming and error-prone.
This is the final part of my Øredev 2011 summary. It covers the last three talks
that I attended and concludes my visit to Øredev.
This is the fifth part of my sum-up of Øredev 2011. These sum-ups waere supposed
to be rather short, but have grown out of proportions. I will try to keep it down.
This is the fourth part of my Øredev 2011 summary. It has taken quite a long time
to get this finished, so I will write a bit less about each session in this post
and refer to external resources instead of spending lines on describing products
I have been using NDepend to analyze the latest version of my NExtra library. The
code is spotless (this is where you should detect the irony), but the analysis is
highlighting some interesting design flaws that I should fix in the next version.
This is the third part of ny sum-up of Øredev 2011. I will label every talk with
day:order to satisfy all structure freaks (myself included) that read this.
This is the second part of ny sum-up of Øredev 2011. I will label each talk with
day:order to satisfy all structure freaks (myself included) that read this.
This is the first part of my Øredev 2011 summary. I will label each session with
day:order to satisfy all structure freaks (myself included) that read this.
I could use some advice regarding a project I’m currently working on. It’s a web
site where people can sign up and join various groups (did I hear a “Facebook is
already doing that”?) and do stuff depending on what groups they belong to.
To grow as a developer, there is nothing as good as inviting others to criticize
your potential flaws…that as well as reading a book every now and then.
I have previously written about how to automate and schedule NDepend for several
.NET solutions at once. After getting into the habit of using it more regurarly,
the power of CQL has grown on me.
In a project that I am currently working on, I use NDepend to continuously run a
scheduled code analysis on a bunch of solutions that make up a large part of the
software infrastructure of a major Swedish company.
I currently have several repositories at GitHub. For some of these repositories,
I have also created a gh-pages branch with a public web site for each project.
When I recently decided to start re-creating a PHP project of mine from scratch,
I decided to replace SimpleTest with PHPUnit and PHPCover.
I am currently moving some projects from an old TeamCity 5.1.2 server to a brand
new 6.5.1 server. Everything has been going great, until I tried moving a project
that uses NServiceBus.
In ASP.NET MVC, Microsoft has done a nice job with creating various HTML helpers
that can be used in a form, e.g. LabelFor, EditorFor, ValidationMessageFor
and many others.
When working with .NET, I sometimes find myself wanting to just clone a solution
instead of setting everything up from scratch over and over again.
I have started to boot up Windows directly from my BootCamp partition on my iMac
instead of running Windows under VMWare Fusion. This way, I do not have to share
resources with the OS X partition, which is nice for gaming, programming etc.
Each time I open up my WPF projects in Visual Studio (2010) and open a XAML file,
my computer switches from the nice semi-transparent theme to Windows 7 Basic.
Although I love OS X, I am still new to it and a Windows user at heart. As such,
the unintuitive and “secret club”-like keyboard shortcuts are not one of my most
favorite parts with it.
While developing a unit tested hobby project in .NET, everything has worked great
until now. Suddenly, NUnit thinks that there is something wrong with an assembly:
A couple of days ago, I blogged about solving a frustrating problem that made my
iMac dead slow. At the time of writing, I was not sure if I had actually solved
the problem, but I can now say that I have.
I have been having big problems with my iMac 27″ (4GB RAM) that runs Windows 7 on
a Boot Camp Partition (using VMWare Fusion). It is basically the same setup as I
have on my MacBook Pro (which has 8GB RAM though), with the minor difference that
the MBP is fast as lightning and the iMac is slow as HELL!
I am localizing a WPF application that consists of a main application project as
well as several separate DLL projects that provides the application with general
user controls, model classes etc.
It has taken some time, but I have finally started building an ASP.NET MVC3 site
that will use the Facebook API to create and authorize users. It’s a really easy
thing to accomplish, and I curse myself for not having a look at this earlier.
I have started using git with my private projects. It works really well, but I’m
having problems with how it integrates with Visual Studio.
My personal WPF WTF list has grown steadily since I started to work with WPF. In
my opinion, WPF is filled with bad naming conventions and inconsistencies.
After some discussions with my colleagues about my latest focus areas, I felt it
could be nice to write a post about custom validation attributes in ASP.NET. It’s
something I use to great extent.
In a WPF application that I am currently working with, I have to be able to hide
the close button of a progress window. Instead of being closed by the user (like
an alert window or a message box), this progress window should instead be closed
by its owner window once its related operation has finished.
When working in a legacy code base of someone else’s making, imagine to refactor
code that is mainly built up on structures like this:
I have a hobby project that works great on MAMP, but that doesn’t run so good on
WampServer. It’s quite frustrating to have to test all new components in two PHP
environments that should be more or less similar, so I decided to look into this.
I am currently working on a GPS-based web application, that lets a mobile device
post its position to the app, which then replies with nearby items of interest.
In a hobby project of mine, I had a really handy UI plugin called FileUploadForm,
that could upload any number of files with AJAX. All you needed to do was to add
such a form to the page to have it handle the entire upload process automatically.
I love HTML5 and how easy things will become once it breaks through. However, it
will take time for many browsers to support HTML5 and until they do, the code we
write must be supported by older browsers as well.
This is not a development-related blog post, but well worth mentioning to all of
you who have been experiencing playback problems when the Spotify app for iOS is
sent to the background.
After my last blog post, where I wrote about adding the Spark template engine to
an ASP.NET MVC 2 project, I decided to create a project template that uses Spark,
instead of the default Web Forms view engine.
After much curiosity, with other stuff stealing my time, I finally got some time
to look at the Spark View Engine. Since Razor will be shipped with ASP.NET MVC 3,
I decided to give Spark a try before trying Razor.
We will probably use ImageGen in a project that I’m currently working on. People
who have used it before really seem to like it, so I look forward to try it out.
After having problems with SquishIt
a try instead.
I have spend some time experimenting with the new HTML 5 localStorage feature.
ViewState is ASP.NET’s way of simulating state in the otherwise state-less web
environment. It is a bag of bytes that is sent back and forth between the client
and server. It is then deserialized by the server, which can use it to restore a
previous state in its components.
About a year ago, I had problems when sending data to a PHP page, using AJAX. In
order to be able to unpack the data, I had to use stripslashes, which does not
seem good. However, since it worked, I let it be without further considerations.
As some of my hobby projects are coming together, I have meant to move them from
Google Code to GitHub for quite some time. Tonight, I decided to give it a try.
Yesterday, I got a demonstration of NuPack: a free,
open source, developer-focused package manager for .NET. It looked awesome, so I
visited the web site, downloaded NuPack and gave it a try. This is how you do it:
I love the jqGrid jQuery plugin. If you have not
tried it yet, I really think you should.
After some time, I have finally got my thumb out and added an NDepend project to
one of my hobby project solution, to get some analyzing done before releasing it.
Yesterday, I built a simple demo page where I demonstrate how easily you can get
fonts.com Web Fonts to work.
The time has finally come to throw Arial and Verdana and a bunch of other crappy
fonts into the trash bin (Helvetica can stay for a while), as Monotype, Linotype
and ITC (and others) have teamed up and developed a really cool service.
presented at rakaz.nl.
The suggested approach in that blog post works great, but has a small drawback.
I have been trying to find info on how to get the name of the current controller
and action in ASP.NET MVC. Eventually, I found out how to:
Since I’m no real PHP developer (just pretending) I have only now started to use
PHP 5.3.2, although it was released quite long ago. The reason to this is that I
have just installed Aptana Studio 2, which comes with PHP 5.3.2, so I guess it’s
time to learn it.
Today, my collegue Johan Driessen showed me a CSS fix for a problem that happens
when a div container has nested, floating divs. This causes the div container to
not resize according to the size of its nested elements, as such:
This post describes how to solve the problem that model validation will not work
for ASP.NET MVC 2 (.NET 4.0), when testing a model that uses DataAnnotations and
MetadataType to describe for its validation.
I am currently working with model validation in ASP.NET, using an Entity Framework 4
entity model, DataAnnotations and partial classes with MetadataType connections.
I have previously used both MooTools and jQuery as embedded toolkits in projects
of mine. I have used MooTools a lot longer than jQuery, but as I have moved more
and more towards jQuery, I now only use MooTools for its nice type capabilities.
I am currently implementing CSS file bundling in a way that uses a virtual path
to a PHP file, as such:
I am currently working on a css bundler, where I have to be able to bundle files
from many different folders.
sophisticated as NUnit is for .NET or SimpleTest for PHP, but it’s reaaally easy
to get started with.
I have a license for ReSharper at work. It’s a really nice utility that helps me
save a lot of time. Besides providing a lot of handy shortcuts and extensions to
the Visual Studio environment, it also integrates NUnit in a very convenient way.
I am currently playing around with developing an adventure board game in XNA, in
which players can play various missions that take place on a tile-based board. I
am a full-blown XNA newbie who takes this approach to learn the platform, but it
is a lot of fun.
I am currently developing an adventure board game in XNA, where players can play
missions that take place on a board that is made up of horizontal tiles. It is a
lot like the amazing, old board game Hero Quest.
I have recently been playing around with the XNA framework to get a grasp at how
to develop games for the XBOX 360. It is great fun, but quite different from the
development I usually do. So far, I have a game engine foundation, which lets me
create generate missions from image/text file tuples, where the image determines
the mission’s board and the text file describes the mission, emenies, goals etc.
After a couple of evenings, my first (really simple) iPhone app is taking shape.
However, since I am a .NET developer at heart, it is painfully clear how spoiled
I have become by all amazing Visual Studio features.
I have now created my first iOS app UI. It’s a nice tab bar that toggles between
four different views. This $$$ are not far away now.
I recently picked up my old, black beast from my basement, where it has lived in
solitude since I bought my Wii. Since it is old and much has happened with the
video game indistry since it came out, I don’t game on my XBOX anymore. I use it
to play around with the XBOX MediaCenter software, instead. After upgrading XBMC
to the latest version, a friend of mine told me about XOT-Uzg, which is a script
that can be used to stream web TV.
I have some strange updates regarding the greeen/orange blinking MagSafe I wrote
about yesterday, where the LED on the MagSafe toggles between green orange, even
though my new battery is fully loaded.
In my last entry, I wrote about problems with my MacBook (strangely though, this
computer is by far the best I’ve ever had…which says a LOT about PC:s :)
I have previously written about my numerous problems with my new, white MacBook,
which I purchased in August 2007. For instance:
I have started looking at XNA, which I’ve been longing to do for quite some time
now. My friend Jens came over to guide me some of the basics, and after a little
configuration, we happily loaded random textures by pressing space.
I am using Doxygen to generate a web-based documentation from my well-documented
NExtra project’s source code. Doxygen also supports extracting the documentation
in various formats (HTML, LaTex, .man, XML etc.). I’ll go with HTML for now.
I have found a really nice Firefox plugin - TwitterBar - which makes it possible
to tweet directly from the Firefox address bar.
A habit I’ve grown into as someone who spends 80% of his time awake in front
of a computer, is to prefer seeing all files in a folder when I use Explorer
or Finder. However, Explorer or Finder have grown into an equal habit of not
showing me all files in a folder. So, how to bend them to our will?
Edit August 28, 2010 SleepWatcher has been changed and differs compared to
the information found in the link below. This approach does, however, still work,
as does the modified script that I provide below.
When paginating collections in C#, I find the following extension methods useful:
I have been trying to use special characters (like « and ») in model
errors that I add to the model state.
From time to time, I forget where the various classes are defined. So, here is a
short tutorial to how you get JSON working in C#:
As I continue to work on the NerdDinner tutorial, I have discovered that some of
my development patterns has to change. Surprise? One thing that has to change is
how I write tests with NUnit, when testing my repositories.
I have finally got around to create my first web site with ASP.NET MVC 1.0. After
looking through the nice started example, I noticed that .css files were manually
included in the master page.
If you find yourself constantly clearing your browser cache because your browser
visit your site and get served with old versions of your scripts and styles, you
may find this quick tip useful.
Sometimes, it may be handy to retrieve all classes that inherit a certain
class. This is not hard, but perhaps a bit obscure:
NOTE: This post was written in 2009. Although the core logic has not changed
since then, the implementation has. For the lastest implementation, check out my
NExtra project on GitHub.
When developing .NET applications, XML comments is a good way of documenting the
code (looking back in 2015, my advice would be to not state the obvious, though).
I have had a lot of problems with getting URL rewriting to work in Windows Vista,
running IIS 7. Compared to IIS 6, virtual paths in IIS 7 will not allow extensions
like .js, .css, which is really problematic if you are working on systems that use
shared files in virtual paths.
I am currently having problems with using the Single MP3 Player with the jQuery
Flash plugin. To see how the plugin works, check out this page.
I currently have problems with identifying the project root in a PHP project.
The separate ways to do so are easy enough, but have problems combining them.
After a very interesting conference talk on Test Driven Development and Behavior
Driven Development, I have finally started getting familiar with it, using NUnit
to write unit tests while developing in .NET and C#.
I have had some serious problems with UTF8 and PHP’s built-in JSON functionality.
After solving it, I realized that it was not even an UTF-8 issue, but a JSON one.
I have been trying out Twitter and Jaiku (a couple of years too late). Since the
two services basically do the same thing, I have evaluated which service that is
the best fit for my needs. Keeping both accounts would just be a hassle, since I
would have to keep both feeds going.
I am currently developing a PHP-based framework called Wigbi, which can be used
to quickly generate sites with a database, data objects that are auto-generated
you add pages and populate them with text, images, links and any data object you
like. It’s actually quite amazing.
In a project where I use the handy DataGridView control I, bind a data source to
a grid view, then listen for the SelectionChanged event. When the event is fired,
I enable or disable other controls according to the data that is contained in the
grid. For instance, I disable a move down button if I have less than two items in
the list, or if the selected row is the last one.
After clean installing Windows Vista on my work computer, then installing Visual
Studio 2005 and Visual Studio 2008, I suddenly faced problems with using dynamic
ports when developing web applications in ASP.NET.
After some initial struggles, I’m now on track with strict XHTML. It’s fun to pay
attention to the code you write and make sure that it follows certain rules. Then
see it validate.
After upgrading to Windows Vista, I have had many problems to run Visual Studio
2008 and IIS 7 on it. For instance, IIS URL Rewriting does not work as it did earlier.
On my spare time, I develop a PHP web application on OS X and thus test my sites
in Firefox, Safari and Opera on a daily basis. Every once in a while, however, I
also verify that the code works in Internet Explorer.
A while ago, I was assigned to optimize a really slow web site. The problems were
numerous, like loading all content of an expandable dashboard with tons of data at
once, instead of when the user expanded each section.