Home
Blog
Reload DNX whenever a file changes
- Dec 17, 2015
- #.net
I am currently developing a console app in .NET Core on my Mac. It’s a rather nice experience, although I miss a lot of stuff from Visual Studio - expecially R#.
Setup DNX in macOS
- Dec 17, 2015
- #.net#automation
After so much waiting, so many “I’ll do this first”, so much app coding etc. etc. (yep, I blame my family as well), I finally managed to start playing around with DNX and ASP.NET 5.
Update the title of an MKAnnotation
I’m building an app that has a map where users can save personalized content and present it in a beauuutiful way. Ok, enough with the sales pitch.
ASP.NET and WebApi attributes with StructureMap
- Sep 11, 2015
- #.net#c##api#dependency-injection
After some time away from .NET, ASP.NET and WebApi, I’m having a great time when setting up a new WebApi solution for a project at work.
sudo is required for all Ionic and Cordova commands
I am currently building my very first app with Ionic Framework. So far, Ionic is super fast to setup and performs really well, so I hope performance doesn’t drop once we begin to add images and content to the app.
Xcode 6.3.1 - Code object is not signed at all
After upgrading to Xcode 6.3.1, I got a new error that I haven’t received before:
Swift return does not work with line breaks
I am currently porting some iOS games from Objective-C to Swift, which involves rewriting a lot of code. While doing this, I stumbled upon something interesting.
Using Swift protocols in Objective-C
- Sep 4, 2014
- #ios#objc#swift#dependency-injection
I am currently creating two new games for iOS. One is made in Swift and SpriteKit, while the other is made in Objective-C and UIKit.
IoC in iOS
- Sep 4, 2014
- #ios#objc#swift#dependency-injection
UPDATE 2017-01-25: Since I wrote this post, much better alternatives are now available for Swift. My favorite is Dip. A second option is Swinject. I really like Dip, but you should check out both and see which suits you best.
Using Crittercism for iOS crash reporting
Note: Crittercism has shut down. A great alternative to Crittercism, in 2017, is Fabric.
Mouse scroll sensitivity in Parallels Desktop
I use Parallels Desktop to run Windows from a dedicated OS X partition. It works great, but requires some setup.
Matthew McCollough - The third wave of artfulness in code
- Nov 11, 2013
- #conference
Oh, my f*****g GOD, I was not prepared for this.
Denise Jacobs - The Creativity (R)Evolution
- Nov 10, 2013
- #conference
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?”.
Siren Hofvander - Being Secure on a Mobile Platform
- Nov 10, 2013
- #conference#mobile
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.
Shay Friedman - 30 NuGet packages in 50 minutes
- Nov 10, 2013
- #conference
Before I start writing about how perfect this session was, first some background information.
David Planella - Ubuntu, A Powerful, New Force in Mobile
- Nov 8, 2013
- #conference#mobile
I’m very excited about the new Ubuntu Mobile platform, despite not being a Linux or Ubuntu guy.
Jimmy Nilsson & Jon Gyllensward - Less is more! When it comes to art and software
- Nov 8, 2013
- #conference
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.
Woody Zuill - Mob Programming, A Whole Team Approach
- Nov 8, 2013
- #conference
Björn Granvik - Distributed Teams
- Nov 7, 2013
- #conference
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:
Christian Horsdal - Layers Considered Harmful
- Nov 7, 2013
- #conference
In this session, Christian Horsdal talked about layers, carefully to distinguish between layers (logical) and tiers (physical).
Scaling mobile at Spotify
- Nov 6, 2013
- #conference#mobile
Anna Beatrice Scott - tekhnasthai
- Nov 6, 2013
- #conference
Automate with Automator
- Oct 8, 2013
- #macos#automation
Bashing the Bash Syntax
Memory leak in iOS when mixing ARC and non-ARC code
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.
Hide the default Objective-c initializer
Auto-increment Build Number in Xcode
Android Activity Lifecycle Car Analogy
- Aug 5, 2013
- #android
Remove Android Activity Title and Icon
- Aug 5, 2013
- #android
Android Assets for Various Screen densities
- Aug 2, 2013
- #android
Android Fullscreen Activity
- Aug 2, 2013
- #android
Run Lint in Android Studio
Android Glossary
- Jul 31, 2013
- #android
Enable USB Debugging on Android Devices
- Jul 31, 2013
- #android
Windows 8 Activation Fail
- Jun 7, 2013
- #windows
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.
Multiple SSH Files
- Jun 7, 2013
- #git
When working with git, I have mainly used a single SSH key pair, which I use for e.g. GitHub.
UIViewController Custom Back Button Problem
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.
New legal label in MKMapView
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.
Perform web.config transforms on build
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.
Entity Framework Code First with auto migrations on AppHarbor...and more"
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.
Natural Scrolling in Windows 8
- Nov 29, 2012
- #windows
In OS X Lion, Apple introduced natural scrolling. It means that when you scroll, the scrollable content will move around like it was a sheet of paper you pressed and dragged around with your finger.
Git not found in Mountain Lion
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.
Oredev 2012 - Day 3
- Nov 13, 2012
- #conference
My third and final day at Øredev 2012 offered some really nice talks, as well as a really crappy one.
Oredev 2012 - Day 2
- Nov 12, 2012
- #conference
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.
Activating Windows 8
- Nov 10, 2012
- #windows
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.
Oredev 2012 - Day 1
- Nov 7, 2012
- #conference
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.
iOS Bounce Animation
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.
iOS Localization
- Aug 20, 2012
- #ios#localization#objc
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.
NDepend 4
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.
CLGeocoder fails silently
I am currently developing a location-based app for iPad and iPhone. This is how it looks:
Xcode - Disable ARC for individual files
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.
JSON in iOS
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.
Retrive Core Data objects with case insensitive comparison
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 strange order:
DevSum 2012 - Day 2 Summary
- May 28, 2012
- #conference
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 :)
DevSum 2012 - Day 1 Summary
- May 24, 2012
- #conference
Today was first day of DevSum 2012, in central Stockholm. This is a short sum-up of the first day.
Posting source code on a WordPress hosted blog
- May 4, 2012
- #wordpress
As you probably have noticed, this is a code-oriented blog that I host on Wordpress. Since I post a lot of code, I have been annoyed at the terrible syntax highlighting for quite some time now.
Adding photos to the iPhone simulator
- Mar 13, 2012
- #ios
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.
Dependency Injection gone too far?
- Feb 27, 2012
- #dependency-injection
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.
Use Phantom/Boo to build, test and publish to NuGet and GitHub
- Feb 22, 2012
- #.net#continuous-integration
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.
Øredev 2011 in the rear-view mirror – Part 6
- Jan 21, 2012
- #conference
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.
Øredev 2011 in the rear-view mirror – Part 5
- Jan 20, 2012
- #conference
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.
Øredev 2011 in the rear-view mirror – Part 4
- Jan 17, 2012
- #conference
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 and concepts.
Trying out NDepend
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.
Øredev 2011 in the rear-view mirror – Part 3
- Dec 6, 2011
- #conference
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.
Øredev 2011 in the rear-view mirror – Part 2
- Dec 1, 2011
- #conference
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.
Øredev 2011 in the rear-view mirror – Part 1
- Nov 23, 2011
- #conference
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.
Where do I put the logic?
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.
Am I writing tests?
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.
Tweaking the NDepend CQL rules to leverage awesome power
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.
Scheduling NDepend for a set of solutions
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.
Grabbing the latest version number from a GitHub repository
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.
Getting PEAR and PHPUnit to work with MAMP
When I recently decided to start re-creating a PHP project of mine from scratch,
I decided to replace SimpleTest
with PHPUnit
and PHPCover
.
TeamCity 6.5.1 does not play well with NServiceBus
- Sep 8, 2011
- #.net#continuous-integration
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.
EditorBlockFor HTML helper
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.
Clone a .NET solution in no time
- Jul 24, 2011
- #.net
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.
Print screen in BootCamp using an Apple keyboard
- Jul 7, 2011
- #macos
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.
Visual Studio and WPF force Windows 7 to apply basic theme
- Jun 27, 2011
- #.net
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.
Open file with the keyboard in OS X
- Jun 14, 2011
- #macos
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.
NUnit BadImageFormatException
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:
How I solved my slow iMac with a constantly working hard-drive
- May 15, 2011
- #macos
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.
Slow iMac about to be fixed?
- May 12, 2011
- #macos
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!
Localizing a WPF application with resource files
- May 12, 2011
- #.net#localization
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.
Running Facebook authentication on localhost
- Apr 4, 2011
- #.net#authentication
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.
Embed Git Bash into Visual Studio
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.
WPF WTF
- Mar 24, 2011
- #.net
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.
Custom ASP.NET validation attributes
- Mar 23, 2011
- #.net#c##web#validation
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.
Hide the close button of a WPF window
- Mar 14, 2011
- #.net
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.
Legacy code horror
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:
WampServer URL rewriting problem
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.
Calculate distance and bearing between two positions in C#
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.
Trying out Plupload"
- Feb 2, 2011
- #web
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.
Automatically convert HTML5 to HTML4
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.
Spotify background playback problem on iOS
- Jan 21, 2011
- #ios
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.
Flush the Visual Studio Template Cache
- Jan 14, 2011
- #.net
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.
Adding Spark to ASP.NET MVC 2
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.
ImageGen Cache Problem
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.
Make Combres work with ASP.NET
- Dec 20, 2010
- #.net
After having problems with SquishIt when bundling JavaScript, I decided to give Combres a try instead.
HTML5 localstorage
I have spend some time experimenting with the new HTML 5 localStorage
feature.
It is a new feature that simplifies storing data in a browser, using JavaScript.
Moving ViewState to the bottom of the page
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.
PHP magic quotes
- Nov 24, 2010
- #php
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.
Getting started with git and GitHub
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.
A quick NuPack walkthrough
- Oct 8, 2010
- #.net
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:
onSelectRow fix for jqGrid
- Oct 7, 2010
- #javascript#jquery#web
I love the jqGrid jQuery plugin. If you have not tried it yet, I really think you should.
Getting started with NDepend 3
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.
Animation disables font in Internet Explorer
Yesterday, I built a simple demo page where I demonstrate how easily you can get fonts.com Web Fonts to work.
Fonts.com web fonts
- Sep 21, 2010
- #typography#css#web
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.
Bundle JavaScript and CSS files with full file paths
- Aug 19, 2010
- #javascript#css#web
I have looked at the great PHP-based CSS and JavaScript bundling approach that is presented at rakaz.nl. The suggested approach in that blog post works great, but has a small drawback.
Getting the name of the current controller and action in ASP.NET MVC
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:
Getting familiar with PHP 5.3.2
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.
Make div container adjust to floating children elements
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:
DataAnnotations and MetadataType fails in unit tests
- Jul 5, 2010
- #.net#c##entity-framework#testing
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.
ConstraintException thrown when posting empty data for non-nullable properties
- Jul 5, 2010
- #.net#entity-framework
I am currently working with model validation in ASP.NET, using an Entity Framework 4
entity model, DataAnnotations
and partial classes with MetadataType
connections.
jQuery, MooTools, object inheritance and JSON
- Jun 10, 2010
- #javascript#jquery#web
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.
/ in URL query makes CSS @import and file paths fail
I am currently implementing CSS file bundling in a way that uses a virtual path to a PHP file, as such:
Bundle CSS files with relative file paths
I am currently working on a css bundler, where I have to be able to bundle files from many different folders.
Hide successful tests in QUnit
- Jun 3, 2010
- #javascript#jquery#web#testing
I am now using QUnit as TDD framework for my JavaScript development. It’s not as sophisticated as NUnit is for .NET or SimpleTest for PHP, but it’s reaaally easy to get started with.
Visual NUnit 2010
I have a license for R# at work. It’s a really nice utility that helps me save a lot of time. Besides providing a lot of shortcuts and extensions to Visual Studio, it also integrates NUnit in a very convenient way.
Find the shortest path between two tiles in a grid in XNA
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.
Generate a game board map from a bitmap
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.
A* implementation for XNA
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.
Using shared libraries in iOS
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.
NSUserDefaults
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…right?
XOT-Uzg TV Streaming on your XBOX
- Jan 28, 2010
- #games
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.
MagSafe toggles green/orange (part 2)
- Jan 28, 2010
- #macos
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.
MagSafe toggles green/orange
- Jan 27, 2010
- #macos
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 :)
MacBook swollen battery
- Jan 27, 2010
- #macos
I have previously written about my numerous problems with my new, white MacBook, which I purchased in August 2007. For instance:
Load all assets in a folder in XNA
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.
Doxygen - A brief tutorial
- Oct 7, 2009
- #.net#documentation
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.
Show all files in Finder
- Sep 19, 2009
- #macos
A habit I’ve grown into while spending 80% of my time in front of a computer, is to show hidden files in Explorer or Finder. However, Explorer or Finder will not to so by default, so how to we bend them to our will?
Auto-eject external drives when Macbook goes to sleep
- Sep 15, 2009
- #macos
Edit August 28, 2010 SleepWatcher
has been changed since I wrote this post
and now differs from the information found in the link below. This approach does
still work, though, as does the modified script that I provide below.
Easily paginate collections in C#
When paginating a collection in C#, I find the following extensions useful:
Use special characters in ModelState error message
I have been trying to use special characters (like « and ») in model errors that I add to the model state.
JSON serialization in C#
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#:
Using Moq with NUnit
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.
Using themes in ASP.NET MVC
I have finally gotten around to create my first web site with ASP.NET MVC. After looking through the nice start examples, I noticed that .css files were manually included in the master page.
Find all classes that inherit a certain class
In typed languages, it may be handy to retrieve all types that inherit a certain class. This is not hard, but perhaps a bit obscure.
Get the week number of a date in C#
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.
Generate HTML documentation from C# XML comments
- May 25, 2009
- #.net#documentation
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).
Make URL rewriting in IIS 7 work like in IIS 6
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.
jQuery Flash MP3 player download error
- May 17, 2009
- #jquery#javascript#web
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.
Identifying the project root in PHP
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.
My first thoughts on TDD
- May 5, 2009
- #testing
After a very interesting conference talk on Test Driven Development (TDD) and Behavior Driven Development (BDD), I have finally started using NUnit to write unit tests while developing new features in C#.
json_encode works bad with UTF8
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.
Twitter vs Jaiku
- Apr 17, 2009
- #social-media#twitter
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.
Automatically convert media links with jQuery
- Apr 16, 2009
- #javascript#jquery#web
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 in JavaScript, using PHP data classes. It also comes with a simple cms that lets you add pages and populate them with text, images, links and any data object you like. It’s actually quite amazing.
DataGridView SelectionChanged event behaves strange
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.
IIS 7 does not allow ports on Windows Vista
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.
Windows Vista, Visual Studio 2008 and IIS7
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.
Internet Explorer document.body.appendChild(...) problem
- Jan 27, 2009
- #html#javascript#web
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.
Avoid empty img src values
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.