Category Archives : Computer Science

Elite Dangerous? Mostly Loading, Mostly Crashing, Mostly Irritating, Mostly Lonely 2   Recently updated !

  Elite: Dangerous is an ambitious game, and on the whole is very well done. Though I would say it has been and continues to be plagued with a number of unfortunate gameplay killing problems, I expect that most of them will be taken care of post-haste. Games generally have two major problems, both are the game designer/programmer/producers fault: Buggy Client/Server The first kind of problem is the buggy client or server, but this is a fault which we can’t really hold against them, because it’s not like there is some cadre of developers twisting their mustaches and laughing about how often the client or server goes down or disconnects. It’s irritating, but generally the pleasure gained playing the game while it’s working can offset this problem. There is also the issue of being an early adopter of a game, the sooner you get in, the more money/power/respect you’ll build up in the game so coping with the growing pains of the client and server as well as the game has its benefits. Shitty Gameplay The other problem a game can have is shitty gameplay, which is a rather broad category which spans from irritating mechanics all the way up to “you’ve got to be fucking kidding me.” While Elite:Dangerous seems to have minimized any serious fun killers, there are a few mechanics which just piss you off to no end. When you couple these issues with the fact that if rand(10) < 5, the server randomly disconnects, or crashes, especially while in SuperCruise, HyperDrive, […]


ANTLR4: So awesome it makes Java look good

I have been trying to write my own programming language off and on for about 5 years now. That doesn’t mean I have spent 5 years on a single project. Only that I have been toying with the idea and educating myself for that amount of time. Writing your own language is kind of the Holy Grail of computer science. Well, writing a language that is actually useful. Over the years, my experience in Ruby, PHP, C/C++, Python and even LISP, has informed my idea of what a good language would look like. Note I didn’t say perfect language. There is no such thing. I have come to believe that all languages are good in some way or another, and bad in other ways. Emotionally I like Ruby, and I like C. The elegant syntax of Ruby makes you happy to program, while the Do-Anything attitude of C makes it the ultimate language. I have been looking at Java( due to it’s cross platform nature ) and have to say at first I hated it. Now I hate it less. The number one reason I hate it less is ANTLR. I love the code generated by ANTLR because it looks like code that a human being would actually write. It’s very dense, but it’s alive. It’s hackish and clever. I have been following along the book The Definitive ANTLR4 Reference. This is a first time for me. Normally I, quite wrongly, just jump in and get it done. This time I am going to RTFM. […]

HTML5 Canvas: Smooth, variable width lines with transparency. 2

When making a drawing app with HTML5 canvas, you might come up against the problem of making a smooth, variable width line. Eventually you might find that you can make several calls to ctx.quadraticCurveTo(x,y,xc,yc) and get some kind of effect. If you stroke every 2 or 3 points, then as long as the line width is very small, you won’t notice the jaggedness. Unfortunately, if you try to do this with semi-transparent lines, the effect is truly horrible. To solve this problem, instead of drawing lines, I simply draw very thin shapes, and fill them with a color. This allows for 1) variable thickness and 2) nice transparency. Variable transparency is a problem I haven’t quite figured out yet. It may require composing the shape from individual pixels, which is simply too slow, especially in IE. What I am writing is a drawing App that works with the Wacom Web Plugin, and therefore varies line thickness based on pressure. I would like to vary opacity too, but this seems problematic right now. A solution that may be possible is to fill the shape with a complex gradient, if it is possible to create semi-transparent stops. Here is an image of what the program does so far:   Each line is actually a full shape, with varying degrees of opacity. Thickness and thinness is accomplished with pen pressure from the Wacom Intuous5 tablet. As the line is drawn, a temporary line is shown to the user, when they lift the pen, that line disappears, and a […]


Jay n’ Mike’s Rules of Acquisition

My programming partner and I have been working for quite some time on some large projects, and we have come up with a basic list of rules that apply to startup computer businesses, from software development to software sales. You have to pay – Nothing in life is free, someone is always paying for it, in time, energy, and or money.  Never-Ever do anything for free, because when it’s free, you’re the one paying for it. That doesn’t mean you have to charge money for things, there are many forms of currency, favors, endorsements, contributions, and forgiveness for mistakes and lateness are all ways of getting compensated for going the extra mile. No funny stuff- This is also what we call Jay n’ Mike’s Razor, similar to Occam’s Razor, where the simplest solution is usually the correct one, this rule states that the simplest and most direct route to a solution is the most maintainable, stable, and testable. Arcane, convoluted, esoteric systems are a hassle. This applies to development as well as business.This rule is akin to the KISS principle, keep it simple stupid, but is more precise in its application, that is, it is not so much about keeping it simple, somethings just can’t be made simpler than they are, it’s about keeping things explicit. While the No funny stuff rule may seem simple and obvious, there are some important conflicts, for instance, while some meta-programming is permitted, it almost always violates the No funny stuff rule. Some optimizations in code, like managing several […]

Qt C++: Threaded Communication with Artema Hybrid on Linux

Communicating with an Artema Hybrid CC Payment device is actually deceptively simple. I’ve written an application what uses a webkit widget exclusively for the UI display, and so I hook into the Javascript to provide some extra functionality to the app, in this case, reading and writing to/from the Artema Hybrid device. The documentation that I received was in German exclusively, so this took a bit of work to get going, but once you have it down it’s very easy. The device is connected via it’s POS connection Serial->RJ45 connection to a Serial->USB (FTDI chipset) converter that gets plugged into a usb port. You use the standard open, read, write and close functions. The Artema Hybrid constantly communicates with your system, so you’ll need to create a QThread to run in the background reading from the device once every second. The Artema Hybrid will send you an ENQ (0×05) and you need to respond with either an ACK (0×06) or an STX (0×02). With the way that I have it set up, the c++ code does the absolute minimum required which is it reads from the device and emits a dataRead() signal which is connected in Javascript. If I read ENQ, then I emit dataRead(“ENQ”). and in the Javascript function that is connected to the dataRead() signal, I see if the string passed up == ENQ. In the javascript, I have an array of data to write to the device, if that array is empty, I just write back to the Device ACK, otherwise, I […]

A Letter to the Creators of EVE

A Response to CCP Hellmar’s Letter. The estrangement from CCP that many of you have been feeling of late is my fault, and for that I am truly sorry. There are many contributing factors, but in the end it is I who must shoulder the responsibility for much of what has happened. I appreciate both the sentiment and the spin, as well as the effort you are putting forward, to be honest I doubt many other game companies would bother to write the letter you’re writing but let’s be honest, the problems with EVE and with CCP are endemic, and asking us to swallow this guilt trip is not coming off as humble as you’d think. I mean saying that you are responsible for the the current state of EVE is like saying Lee Harvey Oswald really shot JFK, sure, that’s the official story, but no one really believes it. I was impatient when I should have been cautious, defiant when I should have been conciliatory and arrogant when I should have been humble. No, You were greedy. We aren’t children, well most of us aren’t. A few of us have lived long enough, and participated in business long enough to recognize zealous hubris from gluttonous greed. You got greedy and you fucked up. You started to look at us like we were just dollar signs, just consumers. …growing the company to 600 people, increasing our subscriber count beyond that of the population of Iceland and on and on, one resounding success after the next […]

Rails 3 – PHP Style Global Variables, $_SESSION, $_GET, $_POST in the models, and everywhere.

PHP Globals in Rails 3 So, as part of my slow descent into hell for even showing this stuff, I thought I would make a quick and dirty post about getting PHP like globals into your models in Rails. I wrote a longer article about globals in the model in rails which you can check out for some other options. def some_before_filter $_SESSION = session $_GET = request.GET $_POST = request.POST $GLOBALS = {} end Yeah, that simple. When it comes to globals, the ruby and rails community is kind of like the child of a former Nazi sympathizer who got off the hook at Nuremburg. Yeah, they’re related, but they just don’t want to have anything to do with them, and if you remind them of the connection they get really angry.

Never Again! Backing up your rails .sqlite3 dbs

Well, with mysql, it’s pretty hard to overwrite your dbs, but with sqlite, it’s real easy. I did this, luckily I only lost about a days worth of work, but nevertheless, I have instituted a new rule for sqlite3 dbs: Hourly backups. Here’s the script: #!/bin/sh D=`date +%H` cp -f /var/www/app/db/production.sqlite3 /var/www/fapp/db/production.sqlite3.bak.$D

Deploy Ruby on Rails to the Desktop (Ubuntu), as a Debian Package 1

Introduction to deploying Rails Applications to the Desktop Some things you’ll learn in this series of articles: How to distribute a Rails App to an Ubuntu Desktop How to Compile a custom Ruby installation to avoid conflicting with an existing Ruby install Get automatic updates to all users for free by virtue of being a Debian Package How to organize a build environment to make and distribute all Debian packages with a single command. How to build your own custom dumb browser in QT C++ (QT Creator now includes the ability to generate an HTML5 App, it didn’t when I started building Salor…) This is not a step by step tutorial, it’s a broad discussion, though I plan to make an example video with a hello world style app at a later date. Deploying Rails applications to the desktop, specifically unbuntu, though I plan to figure out how to do it with windows very soon, turns out to be much easier than I ever thought. While deploying Rails apps can kind of suck in comparison to other types of web-applications, it’s hardly any more difficult than any other kind of executable deployment. The reasons for using Rails for a desktop application are pretty obvious, ease of development, ease of maintenance, and Ruby can pretty much do anything you need it to do. For instance, in our application we use ruby to connect to a receipt printer and print out receipts, reports, labels and barcodes and more. Before you deploy a Rails app, you might give […]

salor point of salor

Love Ruby, Hate Rails, but still use it — or Ruby vs PHP 11

Okay, that title was a bit extreme, I don’t really hate Rails. I don’t get why people feel the need to be so completely polarized about a framework, or a language. It’s either the best thing since sliced bread, or the worst, and nowhere in between. Still, most developers who aren’t Ruby purists, can tend to have a love hate relationship with Rails. Rails is easy to develop with, full stop. It’s practically impossible for you not to push out an app in AT LEAST 1/4 of the time it would take in straight up PHP. The problem is, PHP and Rails are apples and oranges, they aren’t the same thing, Rails is a framework built with the Ruby language, PHP is just a language. If you want a comparison, try CakePHP and Rails. Saying that Rails isn’t as fast as PHP is kind of mind boggling. Rails is slow, and so is ruby, and it will never be as fast as PHP or faster, period. Unless PHP becomes abandoned, which doesn’t seem likely. PHP is 100% geared towards a Server Side Scripting language, from the ground up, it’s written directly into the PHP parser to handle HTML with embedded PHP tags. Ruby is a general purpose scripting language with addon modules for parsing ruby code in HTML, like ERB. Regardless of this, you’d barely notice how much slower it is in reality because at this point, it’s very much a matter of hundredths of a second difference (probably). That barely even matters in large […]