the corner office

a blog, by Colin Pretorius

Money for nothing (minus sales tax)

Being a devoted father and husband, I don't spend as much time playing Eve as I once did. With only a few minutes here and there to spend playing, I finally started doing something I'd been keen to do for a while: playing the market.

In the past, I'd done the 'hauling' type of trading, where you buy your widget at place A, then transport it to place B, and sell it there for a profit. Eve's markets are broken up by region, and the secret to making money this way is getting market data across multiple regions, and then using a fsck-off big SQL query (that's a technical term) with some really ugly joins to identify profitable trades. It can be done - that's exactly what my market trading app did for me in '06 and early last year.

The down side is that you still need to invest time, collecting and hauling goods. You also need to to jump between regions to collect all the market data.

I finally plucked up the guts to do the 'trading' type of trading. With hauling, you're looking for existing buy orders which are higher than existing sell orders. What's a lot more common, is the converse. If you're willing to go out on a limb with some capital, then the greater the gap between buy orders and sell orders, the greater the opportunity for arbitrage.

I started out buying goods which were offered at well below the market's published average figures. Re-sell them at the market average, and eventually you'll make the sale, and a profit to boot. It didn't take long before I realised that instead of worrying about averages, all I needed was to find the margin (and volumes to ensure a quick turnaround). If the gap between buy and sell is high enough, you can afford to place attractive buy orders which'll get taken fairly quickly, and then flog your stuff at or below the market average, with a high probability of having your orders met before anyone else's.

I haven't made a mint, but it's fun making (imaginary) money doing (next to) nothing. Its a fun challenge (how much can I actually make), it's quite a kick going up against other traders who have the same idea (I've already prompted a mini-price war in one market), and it's a good way to build up dosh to buy the heavy artillery for when I have enough time to indulge in normal blow-shit-up online gaming.

Of course, the real mind-fsck with all of this, is that every item I buy and every item I sell, is happening with another character run by a real-life human being. I could never do it in the real world, but I'm participating in an online economy, and making a good profit doing it. It's insane.

{2008.03.31 22:46}

A week of things

Not much to report. Spent some more time in Romania, saw snow while waiting for a connecting flight in Vienna (not a whole lot, sadly), which turned into a snow monkey's wedding - thought that was something, and then had more of the same here in the UK over the past 2 days. Well, I think you'd call it snow - the stuff looks a bit hard for snow, but definitely too soft to be hail. Snail, perhaps?

Update: we had real snow today. Not enough for snowpersons, but enough for a half-hour mostly-covered coating on the grass. We can now declare this winter not a complete waste of a season.

{2008.03.23 00:13}

Train drivers say the darnedest things

On the way home last night (more or less):

Ladies and gentlemen, I would like to apologise for the delay on this service. Unfortunately, the people controlling the London Bridge signal box do not know how to regulate trains. Thank you.

Not exactly reassuring, but at least he was honest.

{2008.03.15 15:12}

RIP Gary Gygax

Sad to read that Gary Gygax has passed away. I haven't played D&D with any seriousness since the 80's, but for a stretch it was a pretty big part of my life, and the magic of it never really leaves you. Sometime soon, I guess, I'll do the same as a lot of people, dig out some of the old manuals and Dragon magazines I still have, and take a trip down memory lane.

{2008.03.05 21:32}

I'm back

So now I can say I've been to Romania. On special occasions, I can gather myself up and say 'you know, when I was in Transylvania...' Aaanyway.

I enjoyed myself. Friendly colleagues, cheap food, cheap booze, and a chance to see a world very different to what I'm used to.

{2008.03.02 23:26}

Jet-settin'

The coming week is going to be cool - I'm off to Romania for a few days. I say cool, because I'm rather excited about seeing a new country, and cool because it's apparently pretty damned cold over there!

{2008.02.24 09:40}

I cannot set a waypoint to the same location twice

Aaah, fire up some way-old Tangerine Dream for atmosphere, undock from the station and point my trusty old Condor at the stars...

Nice to be back on Eve Online. Luckily for me, my old character was still on the server, waiting for me, my EveMail, skills, assets, dosh, the lot. So apart from a black hole of about 9 months of missed skill training, I've just picked up and carried on as if I'd never left.

Not entirely, though. The game itself has gone through some large expansions since I last played... a lot of new features and content that I still know very little about. The way coolest change isn't an in-game feature at all though, it's the addition of an external API. Armed with a unique authentication key, you can now query an API server and get a ton of character and game-related XML data in response. Combined with static game data which is exported regularly and made available for download, you can build some useful and powerful applications. There seems to be quite a lively 3rd party tool community, with a lot of open source code and some nifty-looking little apps. (Oddly enough, none in Java though).

That brings me to something of a cross-roads. My old web based market app is still there, with lots of potential improvements with the API. Frankly, a lot of it was so organic and spaghetti-ish that I'll probably end up rewriting a lot of it. If I'm going to do that, is it worth sticking with Java? My early Eclipse RCP efforts were inspired by wanting to add features to the market app that weren't easy on a web app (at least with my ham-fisted UI skills). Having done a bit more RCP development, I'm not so excited about that. I could do a Swing app but that doesn't excite me either.

This ties into something I mentioned at the beginning of the year. As much as I love Java, I spend all my working hours with Java, and I'm in the mood for something different when I get home. I really wanted to spend more time with C++ this year, but C++ isn't really a solid or productive choice for a desktop app circa 2008. The question, then, is what? Stick with Java, even though I don't like Java UI development much? C#? If so, .Net or mono? WinForms or GTK? (since Eve apparently runs on Linux as well, now). Alternatively, go completely exotic and learn something like Python and one of the many Python UI bindings? Still not sure.

{2008.02.13 00:31}

Done. Done. Done.

Last exam done today. Freedom! I'm still letting it sink in. If all goes well, this was my last exam through UNISA, ever. I've had the studying thing hanging over my neck for so long, that I've forgotten what it's like to not feel guilty about not being busy, to not have that little voice in the back of my head always reminding me of how much work I have to get through. Now I can just be like normal people and come home after work and do whatever takes my fancy, or just do absolutely stuff-all if I feel like it, totally guilt-free.

I have a few pet projects lined up, which I'll blog about as and when, and tonight I did something I've been itching to do for months - I re-activated my Eve Online account. I'm just going to take it easy for a while, and chill the hell out. It's a niiice feeling.

{2008.02.12 00:11}

It ain't funny

In the good old days, the netspeak word 'lol' meant 'laugh out loud', as in ha ha. An expression of laughter a little more reserved than lmao or rofl.

I've noticed over the years though, that it's changed a bit... and on forums and the like, it's just as likely to mean 'nervous laugh' as anything else. As in 'my car just got stolen lol' or 'would you like to go on a date with me lol' or 'I just found out I got crabs lol anyone know a good doctor?'

It's silly.

{2008.02.10 22:02}

Slow code

There's an interesting article on Artima called How To Go Slow, listing a number of performance crimes (mainly geared towards C++ apps). The first section is on complexity, with a pretty graph of asymptotic orders. Somewhat apropos given that I just wrote an exam on the subject this morning. Yes, using bubblesort is a programming crime of the worst order, and quicksort is faster on average, but I couldn't help thinking 'ah, but you could avoid the degenerate quadratic behaviour of quicksort in the ironic case where the collection is already sorted by considering a merge sort (if you could handle the linear additional space requirements), or an accelerated heapsort, both of which provide n log n performance in both average and worst cases...' I'll be over this affliction by Monday, I promise.

Some of the issues, while valid, are less relevant for your average Java/J2EE developer. You generally don't need to know or care how your data is being sorted, just let the API do it for you. (*)

In Java/J2EE apps, ignoring the cost of many slow, bloated frameworks and libraries you've perhaps chosen or been forced to use, you can probably get away with looking at 4 things to boost performance, (and in this order of severity):

  1. hitting DB, network, or file system more than you need to
  2. hitting contended synchronized code more than you need to
  3. doing string manipulation more than you need to
  4. hitting maps and complex data structures more than you need to (especially when combined with #2)

Am I missing anything?

Nothing is ever a replacement for actually having cold, hard profiler and load data to pin-point performance problems, but if you're looking to speed your app up, you can't go far wrong if you start looking at 1-4 above. The biggest performance bottleneck of most server-side apps isn't a lack of l33t performance coding and optimising, it's just doing work you don't need to.

Of course, I'm copping out a bit. The definition of 'need to' varies from programmer to programmer. Some programmers will jump through all sorts of hoops and complicate things in the interests of performance, others will do all sorts of inefficient things to keep their code abstracted and/or clean. Excluding obviously redundant processing, somewhere in the middle is a balance, and therein lies the skill and art, &c &c.

(*) according to the Javadocs, it's a modified mergesort for Lists and a modified quicksort for arrays... I had to look.

{2008.02.08 23:58}

« Older | Newer »