Lee Packham’s Corner
The rants of a software busy body
  • Home
  • Gallery
  • About
  • dtrace Stuff

Is Pirate Bay the new Napster?

Random Rants No Comments »

The smells of “crap we’ve been sued, better do something”. Isn’t this deja vu?

Global Gaming Factory X: Acquisitions of The Pirate Bay and New File – Sharing Technology, p2p 2.0 – MarketWatch.

  • Share/Save/Bookmark

June 30th, 2009 |



Open Solaris 2009.6 CD

Open Solaris, Operating Systems No Comments »

I always like to get this freebie when it comes out. I already had the CD’s of 2008.5 and 2008.11. Now I have 2009.6! I booted it up inside a VirtualBox and I am impressed so far. The stability of the Solaris kernel combined with the userland that you come to expect from Sun. I still feel that the tools around it need a bit of work. Then, one has to remember this isn’t Ubuntu.

Either way, if you haven’t asked for your free CD and are interested in trying out this quite nice OS to develop on, go grab the CD from the Open Solaris CD Order Form. It costs nothing, even the P&P is free.

  • Share/Save/Bookmark

June 28th, 2009 |



Visual C++ Runtime Hell

Programming No Comments »

Visual Studio post version 6 has an interesting time with its runtime library. For those that remember back that far, Visual C++ 6 used a library called msvcrt.dll / msvcrtd.dll. These libraries are included, to this day, in all versions of Windows and remain perfect compatible with Visual C++ 6 compiled binaries.

A lot of other analysis has gone into this on other blogs. I won’t repeat all of it here, but be sure to check out the blog of the KovoIRC developer.

Let’s start out with a simple program. It’s quite basic, but it’s a good starting point. I have made a small Win32 Console Project in Visual Studio making sure that I have made a directory made for the solution and the project directory sits within it.

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
  char* x = new char[100];

  memcpy(x, "Hello World", 11);
  puts(x);
  delete [] x;

  return 0;
}

Your first question is probably; Why are you creating a buffer using new then using memcpy and delete? The answer is that I want to make sure I use the new/delete operators. sprintf isn’t available, so I can’t use that.

Visual Studio Runtime Picker

Visual Studio Runtime Picker

Let’s statically link the runtime with it and produce a release executable. That produces a 53KB EXE. Ok, that’s not fair, there’s features in other runtimes we can’t use. So let’s turn off the security checking etc. Still 53KB.

Normal Static Linked Binary Size

Normal Static Linked Binary Size

Now we have our base point. Let’s do the following:

  1. Convert the solution directory to a GIT repo
  2. Add the git submodule from git://github.com/leepa/libctiny.git
  3. Add the new sub project to the solution in Visual Studio
  4. Add a Project Dependency to the HelloBlogPost project so it depends on MiniCrt

Git makes managing these things insanely easy. By using a git submodule you get to ensure you stay at the point you want to, but update it easily if needs be. Basically, it’s a great way of including 3rd party libraries in a project.

To do all this we can do the following (assuming msysGIT in Windows).

git.exe init
# You probably now want to do your
# adds/commits and .gitignore
# stuff
git.exe submodule add  -- "git://github.com/leepa/libctiny.git"  "libctiny"

Ace, now let’s try and compile again… 4KB. That’s a bit better isn’t it? The same program but a much small runtime footprint.

EXE Size with libctiny

EXE Size with libctiny

Isn’t that much better? For when you just need to do simple executable files, this can’t be beat. I can’t take credit for the library, I just added it a public Git repository and fixed a couple of new intrinsic functions that Visual Studio 2008 defines (ohama @ Google updated it to VS2005).

Credits: Under the Hood: Reduce EXE and DLL Size with LIBCTINY.LIB & omaha – Software installer and auto-updater for Windows.

  • Share/Save/Bookmark

June 23rd, 2009 |



The mix up with tickets and Joyent

Open Solaris, Operating Systems, Random Rants, Web/Tech No Comments »

I think the first thing to say is this post is not a slating of Joyent. They are an amazing company and I have never had a problem beyond little things like back end network routing and the like.

So, about two weeks ago, I raised a ticket:

We would like to shut down the accelerator mentioned above as it is surplus to our requirements.

So. The ticket referenced an accelerator with an ‘i’ in it. We got a nice reply that confirmed the request:

I’ve just set xxxxi to be closed on the 17th.

So that’s all good. I verify against my spreadsheets and ensure that it’s all correct. It is, so I think nothing of it. Until this morning! This morning xxxxl (obviously the x’s are censoring the exact numbers/letters) was turned off! Obviously, as we have a large amount of accelerators with Joyent, I picked up the Batphone and gave them a call.

The reply was:

xxxxi was shut down as requested in ticket xxxxx

But xxxxi was up. xxxxl was down. Nope they’d shut the wrong one down. I can imagine what happened. The ticket system is disjointed with the system that manages the accelerators. Somebody typo’d the entry of which one to shut down.

I guess I’ll find out more when it’s not 3am in the morning. Easier to discuss this stuff when people have had a good night’s sleep! Now to try and explain it all to the big boss man!

  • Share/Save/Bookmark

June 17th, 2009 |



New 13″ and 15″ MacBook Pros Have a Slower SATA Interface

Mac / OSX No Comments »

MacRumors is reporting that the new Unibody MacBook Pros announced last week have an interesting issue:

Apple seems to have quietly downgraded the SATA Interface from 3.0Gbit to 1.5Gbit speeds in some of the new MacBook Pros introduced last week

As correctly highlighted in the posting, most drives can’t saturate it. Apart from, unfortunately, SSD drives. Although these little beggars are still beyond most people’s level of feasibility, they are useful for more rugged conditions. I’m hoping this is a bug in OSX rather than a purposeful hardware change. Or, maybe it’s to make the battery last a log longer?

13″ and 15″ MacBook Pros Have a Slower SATA Interface – Mac Rumors

  • Share/Save/Bookmark

June 15th, 2009 |



First UK swine flu patient death

Current Affairs, Random Rants No Comments »

Stories like this enrage me. Why? Let’s take a look at the story’s strapline on the front page as of right now:

A patient with swine flu and other health problems has died, a Scottish government spokesman has confirmed.

Right, so a patient, who has flu… you with me so far? Died. Ok, that’s fine. The important detail is also included near the top of the story:

The patient, who had underlying health problems, is understood to have died while being treated at the Royal Alexandra Hospital in Paisley.

Of course, the general public will ignore the bits I have bolded here. It’s written as a scare story with the facts only mentioned in passing. The media, already known for blowing things out of proportion, are just at it again. It’s a well known fact, even with normal Flu variants, that if you have underlying health problems, the risk of complications is high. Nice one BBC News, I notice you failed to mention that little detail.

BBC NEWS | UK | First UK swine flu patient death.

  • Share/Save/Bookmark

June 15th, 2009 |



Disabled Twitter Updates on Blog

Uncategorized No Comments »

It’s annoying, spammy, and makes subscribing to a blog pointless. It did however stop the spam as it appears spam bots tend to go more for blogs that have no updates at all. However, for one reason or another, I will have more time to update my blog over the coming months. So fingers crossed, I won’t need that again!

  • Share/Save/Bookmark

June 14th, 2009 |



PSP Go is the talk of E3 opening

E3, Gaming No Comments »

The BBC has posted their first article about E3 opening this week choosing to go with the PSP Go. It’s the first I have personally seen of the device which has had leaked pictures posted all over the Internet.

It looks interesting, but only in that Sony have been desperate to pull consumers away from the Nintendo DS. It’s surely feeling a lot of pressure from the recent DSi release and this is the response.

There is also a bit of talk about the Slimline PS3 – let’s hope they have solved the power issues i.e. the fact it requires a small nuclear power station to be on standby.

BBC NEWS | Technology | PSP Go is the talk of E3 opening.

  • Share/Save/Bookmark

June 1st, 2009 |



Internet Explorer 8 is out – Microsoft fails at QA…

Windows Vista 1 Comment »

Excellent. IE8 is out! I grabbed the installer they said I needed. Double clicked.

Parameter is incorrect

Ok, what’s up there then? That’s right, they didn’t flag the process as needing elevated permissions on Vista. So it wasn’t running as Administrator. Would have been nice for it to tell me. Oh well, Right click, Run as Administrator…

“This installation does not support your system architecture (32/64bits)”

Oh I need to go get the specific 64-bit one. Go get that, still have to manually run as administrator to install.

Microsoft have failed to QA that release then. /golfclap

  • Share/Save/Bookmark

March 19th, 2009 |



Visa yanks security creds for payment card processing pair

Current Affairs No Comments »

This is quite amazing. No more using World Pay then.

Visa on Friday alerted the world that RBS WorldPay and Heartland Payment Systems are not on its list of payment card processors who are in good standing with industry-mandated standards for data security.

via Visa yanks creds for payment card processing pair • The Register.

  • Share/Save/Bookmark

March 14th, 2009 |



Previous Entries
  • What I'm Doing...

    • So that was the technical interview done. Couldn't answer a couple of silly questions but managed to get most of them. Fingers crossed eh 14 hrs ago
    • @carwashh a bank - amusingly another company turned me down for not having enough "big company" experience - they clearly fail at reading CV in reply to carwashh 1 day ago
    • I have a telephone interview tomorrow - weeeeeeeee 1 day ago
    • More updates...

    Posting tweet...

  • LinkedIn

    If you want to see my LinkedIn profile, click on this button:

    Lee Packham
  • Friend's Blogs/Sites

    • David Rickard
    • Michael Smith
    • Mike Arthur
  • Recent Posts

    • Is Pirate Bay the new Napster?
    • Open Solaris 2009.6 CD
    • Visual C++ Runtime Hell
    • The mix up with tickets and Joyent
    • New 13″ and 15″ MacBook Pros Have a Slower SATA Interface
  • Archives

    • June 2009
    • March 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • November 2007
    • October 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • January 2007
    • December 2006
    • October 2006
    • September 2006
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
Copyright © 2009 Lee Packham’s Corner All Rights Reserved
RSS XHTML CSS Log in
Wp Theme by n Graphic Design
Powered by Wordpress