Posted by: orj on: January 5, 2009
I neeeed Resharper. Like a drug. When I don’t have it installed in Visual Studio I feel like my hands have been lopped off.
The other day I upgraded my aging personal license of Resharper 2.5 to the shiny new 4.1 version. However due either my own stupidity or a glitch in the Jetbrains purchase process I got charged the full license rather than the upgrade price (which is significantly cheaper).
Having noticed this error I sent a polite email to Jetbrains requesting a refund for the price difference. This is the response I got:
Thank you for letting us know. This is what we are going to do:
- We are going to delete the purchase of a new 4.x commercial license in your user account.
- We are going to send you a license key for an upgrade from 2.x ReSharper to 4.x ReSharper Full Edition Personal License.
- We are going to send you a refund of 210USD.
Hell yeah! Thanks Jetbrains, for being so awesome.
Posted by: orj on: January 4, 2009
I noticed (due to a tweet from Jeff Atwood) that Joel has uploaded photos of the new Fog Creek Software office space. This appears to be an example of an office environment done right. In the past I’ve worked in office environments that just plain sucked.
Dirty, dark, smelly, badly maintained holes packed with more than a hundred developers. Where scratching around for a clean glass or dust free desk was an exercise in futility.
This sort of thing has a a huge negative impact on staff moral.
On a recent Stackoverflow podcast Joel was discussing the new office and estimated that FogCreek probably only spends an additional 1% of revenue annually on their office space and employee perks than any regular software company might. Yet by doing so, they get what he believes are significant benefits in employee productivity and moral. It also makes for great company marketing (witness this blog post).
Note that FogCreek is not a large company. They don’t have billions in revenue. One of Joel’s assertions is that any profitable software company can do right by their employees in the same way he does.
The office environment I work in at the moment is better than others I’ve worked in but not quite up to FogCreek standards. I can only strive to ensure that I’ll either get to work in a similar environment or can provide one to my own employees in any future business endevour I may pursue.
Posted by: orj on: October 22, 2008
I’ve recently started contributing to stackoverflow.com. For those who are unaware, Stack Overflow is a question and answer site where you earn “karma” for asking and answering programming questions.
Currently my Karma is low (~56) compared to some others on the site (>10k). But I can see how they got up there. They got addicted to answering people’s questions. There is a certain amount of ego polishing that you get enamored with when someone up-votes your answer or otherwise accepts your answer to their question. The system has been engineered from the get go to reward users for providing valuable contributions. It even has XBOX 360 style “achievements” or badges as they are known on Stack Overflow.
The site was put together by a team lead by Jeff Atwood of Coding Horror fame. He and Joel Spolsky of Joel On Software came up with the idea of the site and have been conducting a nice little weekly podcast about its development and subsequent launch.
It even lets you create an RSS feed of your activity on the site so I’ve added that as a side bar to this very blog.
On the whole I’m very impressed.
Posted by: orj on: October 16, 2008
I watched the Mirrors Edge story trailer on my XBOX 360 the other night and noted at the end of the trailer it mentioned the music was from an artist by the name of Solar Fields. The music in the trailer being nice low key ambient trance had me interested in finding out more about the artist. A quick Google had me at his home page and MySpace profile listening to a couple of tracks which were nice. A quick search of the iTunes Music store had me buying the 2007 album EarthShine. I would probably have picked up others if they had been available as DRM-free iTunes Plus tracks.
The album, by the way is very good. The sort of dance/trance that I enjoy a lot. I also notice that Solar Fields is playing the Earthcore festival here in Melbourne in November.
Posted by: orj on: October 4, 2008
I just downloaded and had a brief play with Plex on my Macbook. It is basically a direct port of XBMC (Xbox Media Center) to the Mac platform. This makes me want to buy another Mac to plug into the telly to replace my current XBMC.
The trust old XBOX is getting a little underpowered. It can’t output HD and it can’t decode HD content on its puny 700Mhz Celeron processor.
Now, where can I find a cheap Intel Mac Mini when I need one.
Posted by: orj on: October 4, 2008
If the rumours of new MacBooks with nVidia chips is true, I’m so buying one.
I love my little MacBook. I’ve been programming an iPhone app on it all day. And if I can get it to actually do decent 3D via an nVidia chip I’d love it even more.
Posted by: orj on: June 19, 2008
I’ve been using Firefox 3 for a day or so now. I’m liking it. It definately seems nippy. More so than Firefox 2. Not sure about the OS integrated look and feel though. Having not used Safari much I’m not used to MacOS X style buttons on web pages and such.
A good upgrade I think. Now I’m sure will come the torrent of patches. I wonder what point release number we’ll get to eventually…
Posted by: orj on: June 17, 2008
What happens with this C++ code?
class Foo
{
public:
Foo(bool myDefault = true): default(myDefault) {}
bool default;
};
void FunctionFoo(const Foo& foo)
{
if(foo.default)
cout << "default";
else
cout << "not default";
}
void main(){
Foo* pFoo = new Foo(false);
FunctionFoo(pFoo);
}
Any guesses?
Well it prints “default”. You may have expected it to print “not default”. Why is that, you ask?
Well, what happens is that in main FunctionFoo() gets passed a default constructed version of Foo. Not the Foo instance pointed to by pFoo. Quite a subtle bug I think. Especially because the compiler says nothing. How do you fix this problem. Easy. Put the keyword “explicit” in front of the constructor.
This has to do with the fact that C++ will implicitly convert parameters to methods/functions whenever it feels it can. See Effective C++ Item #18.
In C++ it is possible to declare constructors for a class, taking a single parameter, and use those constructors for doing type conversion. For example:
class A {
public:
A(int);
};
void f(A) {}
void g()
{
A a1 = 37;
A a2 = A(47);
A a3(57);
a1 = 67;
f(77);
}
A declaration like:
A a1 = 37;
says to call the A(int) constructor to create an A object from the integer value. Such a constructor is called a “converting constructor”.
However, this type of implicit conversion can be confusing, and there is a way of disabling it, using the keyword “explicit” in the constructor declaration:
class A {
public:
explicit A(int);
};
void f(A) {}
void g()
{
A a1 = 37; // illegal
A a2 = A(47); // OK
A a3(57); // OK
a1 = 67; // illegal
f(77); // illegal
}
Using the explicit keyword, a constructor is declared to be “nonconverting”, and explicit constructor syntax is required:
class A {
public:
explicit A(int);
};
void f(A) {}
void g()
{
A a1 = A(37); // OK
A a2 = A(47); // OK
A a3(57); // OK
a1 = A(67); // OK
f(A(77)); // OK
}
Note that an expression such as:
A(47)
is closely related to function-style casts supported by C++. For example:
double d = 12.34; int i = int(d);
While I “knew” this stuff, I’ve been bitten by hidden bugs due to implicit converting constructors a couple of times recently so I thought I’d share it just in case others were not aware or had forgotten.
I highly recommend using the explicit keyword on all your single parameter constructors unless you explicitly want to use C++’s implicit conversion feature. Personally I think this is a broken language feature. 99% of the time you don’t want implicit conversion. When you do you should have to specify an “implicit” conversion constructor eg:
class A {
public:
implicit A(int);
};
But I’m not on the C++ standards body so I don’t get to make those decisions.
Posted by: orj on: June 6, 2008
Today I went into Allans Music and bought myself a Stealth Plug electric guitar to USB 2.0 DAC. This device came with a copy of Amplitube Live 2.0.
Amplitube, made by IK Multimedia, is guitar amp and effects modeling software. Basically it makes you guitar sound awesome. As if you’ve spent thousands of dollars on amps, stomp boxes and the like. It plugs into all the usual pro audio software that you might have.
I’m a rank amature when it comes to playing the guitar and even more so when it comes to audio production software. But plugging this little widget in to GarageBand and playing along to Smoke on the Water by Deep Purple and having it sound right just puts a giant shit kicker grin on my face.