Input Devices

So, digging around my usual RSS feeds, and I spotted this little beauty on CuriousInventor. Looks like a fantastic bit of kit, and a really nice take on traditional faders.

I’ve got JACK set up on my laptop very effectively now, and it’s getting to be quite the multimedia all-star. Video it struggles with- after all, it’s a netbook- but audio it has no problems doing. I’m going to try and pick up a Digidesign MBox 2 at some stage to top the package off and move some DSP off-JACK. But controlling stuff on a small laptop or even a desktop can be troublesome, and there’s not a huge amount of choice when it comes to budget MIDI controllers.

One thing I’d be interested to hear about would be a simple MIDI processor/PIC/chip. My main problem with doing things like this myself is the PC interface; the Stribe1 goes for the Arduino approach, which is great but requires an Arduino and usually some tenuous birdnests to interface the Arduino to the hardware. I’d love to see a simple USB-MIDI driver board which could take some analog/digital inputs and turn it into MIDI over USB. Reliability is somewhat important in live audio, and if I could remove the slightly worrysome birdsnests from the equation I’d be a happer, saner (Relatively) person.

I’m still shocked at the complete lack of big red buttons on most electronics websites.

Posted in Awesome Stuff, Odds and Ends | Tagged , , | Leave a comment

Officer and Faction Item Support

So, after seeing the hundredth ‘Error occured while loading market#view’ email arrive which related to someone getting an officer or faction item, I decided I would drop what I was working on (index pregeneration) and implement non-market items on the market.

You can now view non-market items, submit prices for them, and view prices aggregated weekly from eve-prices.net. It’s not perfect, but that’s just down to what data EVE Online will let us get at! Hopefully we’ll see more support of contracts over the API soon; CCP have now moved the API to it’s own SQL server, so performance of API requests isn’t such a huge problem any more.

I’m also experimenting with advertising on both this site and EVE Metrics. Hopefully I’ll be returning to Project Wonderful, which I’ve used to great success in the past on other websites. While I’d love to provide these sites ad-free and for-free, unfortunately server costs do exist and I just can’t afford to run things for free right now.

Posted in EVE Metrics | Tagged , , , | Leave a comment

EnvyCasts

Now, I’m not usually one for plugging paid-for services. I’m an open-and-free kind of chap at heart. However, there’s no such thing as a free lunch, and while there is a free option for this particular service- that being Rails videocasts- one must be reminded that a free lunch is going to taste worse than the 5-star buffet in the nice resturant.

Anyway, enough waffle. I had first tripped over EnvyCasts on my RSS feeds through various Ruby blogs, and never got around to actually getting any. Having purchased both the Rails 2.2 and Scaling Ruby videocasts, I’m genuinely impressed. They’re of a very high quality, the explanations are excellent and the content is at a level approachable by even beginners but aimed at a higher level than most videocasts. It’s like Railscasts on steroids.

So, if you have $9 (So around £0.50), I strongly recommend picking some up if you have a spare moment.

Posted in Awesome Stuff | Tagged , , , | 1 Comment

Rails I18n Tips

I’ve just finished implementing and localising Nexus in it’s entirety. It’s a weighty YAML file of translations, weighing in at just over 350 phrases and words.

I thought I’d share my tips on implementation as there seem to be a few gotchas. For me, load_path didn’t quite work as intended, so I came up with this:

1
2
3
4
I18n.default_locale = 'en-GB'
Dir.glob("#{RAILS_ROOT}/lib/locale/*.{yml|rb}").each do |f|
  I18n.backend.load_translations f
end

This goes in environment.rb after the Rails Initializer, and loads in all the translation files I have in /lib/locale. Once loaded, you can set the locale you want in a set_locale method as before_filter in ApplicationController and you’re set. You can now use I18n.t(’key’) in views and so on

Some tips and warnings, however.

  • Don’t reuse phrases. What’s reusable in one language may not be in another.
  • Namespace. I made the fatal mistake of not namespacing enough- I would recommend models, views and controllers as your bases.
  • Where possible, keep HTML out of your YAML. It makes it easier to read and keeps formatting and style to views instead of localisation material.

And don’t lose hope. It took me a solid day sat down working through the app to get everything sorted out for Nexus, but it’s very much worth it! Now the next challenge-finding translators…

Posted in Code Snippets and Examples, Nexus | Tagged , | Leave a comment

Nexus, Rails 2.2, I18n

Now I’ve finished off EVE Metrics’s indexes (Performance tweaks are nearly done, just waiting on a few external patches for various bits and pieces) I’m cracking on with Nexus. I figured a good thing to do would be to rewrite all my views, partly to tidy them up a bit in places, partly to ensure everything was written to W3C standards, and partly to implement Internationalisation (Otherwise known as I18n).

Rails 2.2 comes with I18n built in, so I’ve been using that. It’s a slow process, turning every string into it’s own categorised, indexed line. It’s all in YAML though, so I can easily work on it freehand without needing to worry about complex systems for storage. The one downside is I get to reload my development server to see changes to the pages, but that’s not too big an issue. It’s easy to use and works like a charm, so it fits the bill for my purposes.

Also, Rails 2.2 is thread safe! I’m interested to see what this does performance-wise on Passenger. Load on my server isn’t a problem but memory is my main concern- Passenger with Ruby Enterprise Edition works great by sharing common elements in memory to reduce usage, but thread safe Rails means I should be able to get away with running fewer servers in the first place. I’ll spend some time with JMeter and New Relic RPM at some point to see what the real-world gains are.

My next challenge is going to be creating a decent looking fittings/kill display interface. I’ve learned a lot working on the TacMap, and have some ideas for how I’m going to display fittings. I don’t think I’ll use the ingame fittings screen picture with overlays; it’s overly complex and imo there’s better ways to show fittings. Considering one of the main goals with Nexus is high performance and given the slashdot-effect style killboard spammings that occur whenever a big kill gets scored, I’d like to try and keep the SQL loading down to a minimum.

I’m also trying to work out what the best way of handling caching will be. My whole configuration system thus far is getting looked at sternly- I’m using Configatron, but think I need something a little beefier than that which supports some kind of webinterface for editing configuration values. Still, that’s a problem for another day.

On the EVE front, Shrike lost his titan. Again. In exactly the same way (cloaked off a gate). Yay.

Posted in Nexus, Odds and Ends, Programming | Tagged , , , , , | Leave a comment

EVE Metrics gets Location-Aware

Tactical Map - GUI next!

EVE Map -Next step GUI!

I’ve been working on EVE Metrics as well as my out-of-game EVE map (still without a real name) over the past few days. First things first- EVE Metrics now provides indexes. Ever since the Matari Mineral Index closed trading, corps have been limited in choice for indexes on various items. EVE Metrics is now providing two indexes, one derived from reported orders and the other from EVE’s reported past data. The indexes are wide-ranging, the calculation takes a while, and more interestingly, EVE Metrics now supports favourite regions, allowing you to fine-tune your EVE Metrics browsing experience to provide indexes only related to your regions of operaiton. In future I hope to expand this out to the market, too.

This leads me to an interesting issue- performance. The indexes, what with the nature of customisable data, are all computed in realtime. Trouble is, that’s around 10 seconds of work once all the data has been pulled out of the database, had some maths done to it, and so on. Caching is no good because it’s customisable by users in realtime. Thus, my solution (soon to be implemented) is this; when you load an index, if you are the first person to request that specific set of regions for that index, you will be faced with a progress bar showing index generation. This will be AJAX-updated and hooked into BackgroundRB, which will do the actual index generation, cache it as serialised YAML in a database, and tell the AJAX loader to grab the page, which will render using those cached values from the database. Subsequent requests for that day will be cached automatically. While this seems like it wouldn’t help that much with performance, for those not logged in this will be an absolute boon- having the page instantly load with indexes for all of empire rather than having them wait for 10 seconds is a much better situation.

Once this is sorted out I plan to divert my efforts to Nexus, which includes the killboard components that will form the basis of the killboard in EVE Metrics. Hopefully I can get that sorted for the end of the week, and start merging the changes back upstream to EVE Metrics! From that point on it’s API all the way as I spend some time working out a security model and implementing all the API features as data loaders for EVE Metrics.

Posted in Programming | Tagged , , , , , , , | Leave a comment

Live Dev Blog - Fallout

So I sat in on a Live Dev Blog today. Well, what can I say? It was an exercise in futility. Coupled with the fact that t0rfifrans, our designated CCPian for the blog (and a hotly anticipated one at that, given his up-front and no-bullshit remarks surrounding ghost training), had to miss the blog due to his wife becoming hospitalised (thankfully for minor issues); this and Zulupark’s neat dodging of questions and Mindstar’s neat choice of questions lead me simply wanting more.

Maybe it was the way Zulupark touted ‘new gates’ as a major part of the next expansion. Let’s be honest- new gates are hardly shocking. Shiny, sure. Important gameplay change or vitally needed rebalancing? Nope.

Now, don’t get me wrong. Both Zulupark and Mindstar did a fine job in what was rapidly becoming a tricky situation. But CCP is in a rut right now, especially if you ask the playerbase what they think of recent decisions. CCP has been dodging the real questions and, while doing a great job occasionally, tainting the perceptions of players with decisions like disabling ghost training. Read More »

Posted in Odds and Ends | Tagged , , | Leave a comment

Processing - Obsessive Camera Direction

Processing is awesome, and what better way to improve a sketch like a map viewer than to give it some juicy mouse/keyboard controls?

The Obsessive Camera Direction library for Processing lets you do just that quite easily. Simply install the library and follow the guide for easy, awesome controls.

Read More »

Posted in Processing | Tagged , , | 1 Comment

Processing again

I’ve gotten back into Processing for yet another attempt at creating an out-of-game EVE Online map. So far so good.

Sort of working!

Sort of working!

I’ve ended up creating a custom database to run the app off based on the Empyrean Age 1.1 data export from EVE, and that’s hooked into Processing using the MySQL library. The systems (and jumps, now) get loaded into the sketch on load, and are stored in two arrays as classes. As a first Java project it’s interesting to note the differences between Ruby, PHP and Java. I think I’m going to look at Processing on Ruby soon.

Hopefully this will run smoothly enough to get some data hooked in with XML feeds off EVE Metrics to provide a nice way to visualise things outside the browser. OpenGL is a bit iffy when used in the browser with Java, but I’m not really that fussed about making this a part of the site, more of a cool tool if you want to tinker. I’ll throw it all up on Github once it’s gotten halfway decent.

It’s made me wonder, though- is there anything akin to Processing out there that isn’t Java? I’d be really interested to see anything either C-based or Ruby-based that goes for more of the ‘visual programming’ angle rather than the more generic frameworks that tend to flourish these days.

So very tired, but tomorrow brings rest, a fresh Stargate Atlantis episode, and the potential for loads of lounging about for a week of holiday. Bliss.

Posted in Programming | Tagged , , | 2 Comments

EeePC1000H Continued

Been spending a lot of time playing around with the EeePC. Overall impression has been universally awesome, and it certainly gets a few looks for it’s tiny size.

I’ve got it well and truly tweaked now, including two-factor authentication with pam_usb, motion-sensing CCTV on the webcam when the screen is locked, bluetooth proximity linked automatic locking/unlocking with my phone, conky on the desktop, compiz fusion and a nice custom dark theme based on clearlooks, plus some helper scripts to tune the fanspeed to something a little quieter than default.

My one complaint would be the keyboard. It’s hardly solid, and I’ve had one key skip off. That said, it’s on a par with most laptop keyboards. Recommendations for good, portable keyboards would be appreciated.

I’m also looking at how best to organise notes. I’ve been using Tomboy for now, but it’s got a few snags which kill it for me:

  • Notebooks are woefully underimplemented
  • Links are cross-notebook
  • Organisation is hard to achieve
  • Categories don’t exist, nor do tags or the like

So I’m down to A) write my own, or B) use something like Wordpress, Radiant or Mediawiki to cook my own from another base. I’ve already got all my dev tools (and a whole crapload of wireless/network security tools, too :p) on the box, so running a webserver isn’t a problem.

I’ve been hunting around on eBay for a bluetooth GPS and a USB wireless device. I’ve found a Holux 236 bluetooth reciever which should work great with gpsd to connect to Kismet for wardriving and general Wireless-GPS correlation. I still need to hunt down a USB wireless card to connect up so I can use external aerials for my laptop, and then I think I want to get my laptop some power off my car’s 12V power, probably needing an inverter for that.

Posted in Odds and Ends | Tagged , , | Leave a comment