lördag 8 februari 2014

Eclipse + SSH

I work a lot across multiple systems of various OS'es and configurations, and usually I do it via ssh. However, almost everytime, the tasks get much slower than they ought to be, due to the fact that the remote system doesn't have your local tools and configs.

Since I mostly use Eclipse on my local system, and since it's plugin based, I thought of searching for such plugins, and imagine my surprise that it actually exists!

It's built in, and it's called Remote System Explorer.


söndag 10 november 2013

C++ / Python / C# speed

The beginning

Even though there are many language tests out there on the internet, I wanted to have a go at it myself, to find out the cases I wanted to know about and to have control over the test. Also, I wanted to do it because I thought it might be fun to write a little testing framework and reporting tools! (And it would make some nice weekend programming)

But even though this might be a bit whimsical, one real question I've had for some time is "how fast/slow is Python compared to C#" (Or C++ even) ? So I went ahead and tested the languages I come across most often: C++, Python & C#.

If you want to skip to the results, here they are:

And here is the code:

onsdag 9 oktober 2013

Compacting Virtual Box Drives

Too many times I've forgotten the exact commands on how to compact the virtual drives. Especially for windows, where the tool used, used to have a different name of the argument passed to it. Compacting the drive can save you lots of disc space (last time my drive went from 12GB to 5GB), and for a smaller lap top drive, that makes a big difference.

Windows Guest:
Download SDelete from SysInternals and then run

Linux Guest:
Here, we create a file that fills the entire empty space, and then deleting it:
Host:
Finally, you let VirtualBox compact the drive

That's it really! I hope I'll remember it a little better this time.

Further info:
Use “sdelete -z” when Shrinking a Windows Guest’s Virtual Hard Drive
How to Compact a VirtualBox Ubuntu Guest’s VDI file



lördag 8 juni 2013

Qt Plugin Cache

When upgrading an application to use a newer Qt version (4.8), I stumbled across a weird issue with the sql plugin not loading correctly. Even though I triple checked the paths, it didn't work.

This was surprising since if I used the previous Qt version (4.7), my app worked fine!

After much trouble shooting and testing and googling, it turns out that there is a thing called the "Qt Plugin Cache"!

måndag 28 januari 2013

git (msys) + merge + araxis

I struggled with setting up the git environment for my windows environment.
And since it's easy to forget these things, I'll just add the command lines for it here:


lördag 5 januari 2013

binpacking + fonts

Skyline-BL (Bottom Left) with
rects sorted on height. Rotation of
the rects were not enabled.
During the holidays, I've been working with my hobbyist project of generating bitmap fonts. One of the issues I hadn't looked into yet was the problem of wasted space between the glyphs and rows. And while I still wasn't actively looking to solve that problem just yet, I stumbled upon a good read by Jukka Jylänki - "A thousand ways to pack the bin - A practical approach to two-dimensional rectangle bin packing" from 2010.

It was a nice explanation of the most common bin packing algorithms and it also came with public domain source code (Thanks Jukka!)





torsdag 9 augusti 2012

Compile Time Hashes pt2

While waiting for Visual C++ to implement the C++11 features I wrote about in the previous entry, I wanted a solution that worked on windows. This time I needed to implement the hashlittle function found in lookup3.c.

I used template programming to get the size of the string at compile time and I also relied on the compilers to optimize the code into the final result.

You can download the final code here: hashlittle.zip
Update (2012-08-20): Fixed bug in function for edge cases where the string was a multiple of 12 (doh!)