Archive for the ‘Computing’ Category

How I learned to love arrays – featuring Tracker2D

Tracker2D Publicity Shot 11Recently, I’ve been working on a huge update for my pet programming project. Since development is still pretty steady, this probably isn’t much of a surprise – recent commits have included a teleport tile that can send bugs to arbitrary points on the canvas, improvements to the style of menus, limited UI customization functionality, and so forth. I spent much of the last week overhauling Tracker2D’s audio ‘system’ by more comprehensively exposing the HTML5 Web Audio API’s various audio convolution and filtering features. This has been quite a task, and I thought writing about the process would be interesting as well.

Read more…


News Update – Tracker2D

Tracker2D is a program where a bunch of smiley faces run around a field of colorful dots and cacophonous noise plays.

Tracker2D Publicity Shot 4

This screenshot should be at least representative of the program’s general functionality.

It occurs to me that the summary I just wrote for this program may be intentionally inaccurate. Whether Tracker2D is a toy, a digital audio workstation, or a visual programming language, it’s still a browser-based music creation program I’m working on that you can check out here. As of today, it is in very active development with new features being added all the time.

If there’s any one philosophical point underpinning Tracker2D, it’s the idea that a musician’s output is shaped by… well, the shape of their instrument. A pianist is going to have a different approach than a guitarist, or a violinist, or a percussionist, and so forth. More subtle, however, is the influence of your composing tools. Having written a lot of music, I’ll note that I underwent pretty massive paradigm shifts when I made big changes to my workflow – from notation in Sibelius, to step sequencing with Famitracker/OpenMPT, to piano rolls in REAPER, and so forth. Even subtle things like how these programs map keyboard shortcuts to editing functions have probably altered elements as fundamental to how I work as, for example, tonality and rhythm.

You might be wondering what this has to do with the actual software at this point. Tracker2D is nonlinear by design; you cannot determine the order of execution for musical events you input into the software simply by panning your eyes in one direction. Instead, your musicians (“bugs”) travel over a two dimensional field and can end up all over the place depending on what sort of instructions you paint on the field. At this point, there’s even some basic programmatic ability with counters and teleporters; at some point, you’ll be able to create relatively complex musical machines of a sort; how Turing-complete these are depends on how much work I’m willing to do in the future. The entire visual<-> sound relation concept is inspired by Toshio Iwai’s work, especially Simtunes. Tracker2D is intended to be more complex and “useful”, though – it’s going to implement a larger soundset, bugs aren’t tied to specific instruments, you can have up to 8 simultaneous channels instead of merely 4, and so forth. Then again, Simtunes was explicitly marketed towards children, so it was kind of simplistic in a lot of ways. The people whom I’ve discussed this with probably know what I’m talking about.

Anyways, I might end up sharing some devnotes on the software through this blog, so if that sort of thing interests you, keep an eye on this. You might want to follow the Facebook page, too. If you’re REALLY interested and want to actually help out, check out the GitHub repository and maybe contribute some code. Tracker2D is written in Javascript, with HTML5 Canvas/CSS markup for the UI, and runs best in the latest versions of Chrome or Firefox.

Pickup Lines That (Probably) Won’t Work #3: Compsci Edition

The guy (Matt ‘GrandDracolich’ Anonymous Parson) who does these is a computer science major. Isn’t that something? The previous installment, which is more varied, can be read here. Incidentally, his LP recording setup has improved in recent weeks; especially a reason to check out his Youtube channel. You can supplement your stupid LoLSpeak with more competent gameplay; he particularly likes spectating and recording high Elo games (2300+).


21. Call my constructor method, see what happens.
Uh, what input does it take? 5.25 inch or 3.5 inch?
22. How do you feel about UNIX? Please don’t mishear that one.

23. Why don’t you come back to my place and we can iterate over each other?

24. You’re not my type, but I wouldn’t mind casting you to it just this once.
Are you sure? I’m very strongly typed and don’t have support for generics.
25. Wanna concatenate?

26. Are you soft, where?

27. Hey baby, you look like you’re early FORTRAN, but I promise I won’t punch.
And you look like Malbolge!
28. Wanna see how a Do-While loop works?

29. I set my array to contain two objects. All that’s missing is you.

30. Want an access violation?
Hey! That’s an illegal operation! Don’t make me terminate you with my mace!

A little more esoteric than usual, but this is what I have niche audiences for.

Ad tracking, and how to do it right

Now, long time readers (I know you’re out there. Show yourselves!) will realize that I’m not a very commercial guy, being in favor of free data and Creative Commons and new patronage, where the community at large sponsors their favorite artists by donating money to them. Part of it has to do with the fact that most ads, regardless of how manipulative  they are…. are just retarded. It’s to the point that I (an amateur at advertising) think I can do it less offensively, if not necessarily as effectively.

This one is a few years old, but I remember seeing it, and other similarly themed ads like “Is it real or fake”, and everyone’s favorite, “The ugliest dog ever” plaguing Youtube for a few months. Now, Google has an option where users have advertisements tailored to their needs, but I’ve turned that off. I imagine that their adwords and targeted messages probably have all sorts of desperate pleas and painfully obvious scams floating about them.

Now, as I see it, there are two solutions, and both of them involve filtration by humans. One of them is to have the operator of a site choose which ads display or don’t display, which is one of the main functionalities of Project Wonderful. Obviously, this only really works on specialized sites like webcomic hosting, but a competent user is going to end up with ads that are less obtrusive and more interesting to viewers than on average.

The other, more general solution is just to put a like/dislike toolbar under your advertisements, and let the viewers choose which advertisements they want. Now, if this is implemented, you’re probably going find that dislikes significantly outnumber likes, which makes sense, especially if you haven’t been paying much attention to what you advertise. But even then, you’ll have some chance to determine what kind of advertisement offends your audience the most, and shift towards less blatantly idiotic adverts. This would work better on more diverse, heavily traffic’ed sites, like news portals or Youtube, mainly since the increased mass of community would reduce the effects of vote manipulation.

“Less obtrusive” and “More interesting” seem contradictory, perhaps, but an unending stream of garbage advertisements is going to drive the more intelligent viewers away and reduce brand loyalty. As you should know, the elites have all the money; pushing them away is going to destroy your support, unless you somehow manage to get enough pay-per-view rates to finance your website. That’s right, get those autorefresh scripts out.

The oddities of internet advertising

In the course of browsing the internet, I find all sorts of advertising. This is nothing new; even I’m trying to get word out on things like this blog and First Contact Is Bad For You. To this end, I’ve been doing a lot of graphical design work in GIMP, and I’ve been learning a LOT about the field from it – take for instance this banner ad I designed.

I consider myself an amateur at this, but I think it fits the main criterions of an advertisement – eye-catching, informative, not annoying or gimmicky, etc. Hopefully, not the sort of thing that someone would download AdBlocker for.

On the other hand, someone’s decided that, in fact, they don’t have to be informative. They clearly think there’s no need to even tell potential audiences the NAME of your product, otherwise they wouldn’t have approved and uploaded an advertisement like this:

Technically, it’s far from the worst possible example. Whoever made it had the decency to put SOME visual cues into the thing, so that anyone who decides to click it has some idea of what to expect, what with the police car and the low polygon count. I did some basic research, and this lead to a website called “TimeWasterz”, which, as you would expect, specializes in online video games. You won’t find anything particularly interesting there, but they do have such favorites as “Counter Kill”, “Park Your Ride”, “Mafia Driver 3″… what do you mean you’ve never heard of such things? Oh right, you can’t be expected to play all the latest shovelware. So it was basically one of  a million generic web gaming sites, probably designed to entice prepubescent boys in search of freebies, like I also found a variety of shoddy advertisements on the site; some were of the anti-informative “Play” variety, others ripped off well known licenses, like Mario, and so forth.

I didn’t stop there, of course. First, I went to Quantcast and looked the site up – their traffic varies significantly, but for most of the months mentioned, over 50,000 (possibly unique? I don’t know) people visited the site each month. That’s an awful lot for one of these fly-by-night ‘arcades’, but most of them fell into the under-18, low-income part of the population, which was to be expected. Then, I found that the company directly responsible for the advertising services was called “Ideal Internet”. They supposedly manage web traffic for a bunch of these sites – besides the aforementioned TimeWasterz, there were a bunch of other crappy online ‘arcades’ with very similar page designs. II’s website is full of incoherent corporate babbling – for instance, check out their “About” page. Here’s some samples:

1. Our goal is to direct users to the appropriate website which best fits their interest.
Sounds honorable enough, but as an online gamer, I’d rather go to a GOOD, reputable Flash portal like Kongregate, Newgrounds, or Armor Games. The type of site you serve is the type I’d like to avoid.

2. This website should then be reconfigured in order to accommodate each audience group. Non-valuable traffic should be “equally traded” to another related website where it may hold more value.
In other words, they don’t want periphery demographics, and are willing to shunt them all over the place. Also, note how they’re more interested in redesigning websites so that they’re relentlessly targeted towards specific demographics than they are making user-friendly content.

3. This form of advertising is best suited for internet users who have no intention or real purpose online other than to waste time. Arcade websites present a near perfect environment for interactive advertisements and there is an abundance of internet gamers.
So in short, children. Quantcast is backing me up here. They rarely do their research beforehand, and also lack the judgement to avoid these dodgy advertisements/sites.

It’s an amusing combination – they’re working to ensnare an audience that not only isn’t capable of fighting back, but is difficult to profit off due to its lack of funds. That, combined with the fact their products are of inferior quality, is sure to catapult them into the public name overnight. The sad thing is that this sort of thing probably actually works – IdealInternet has been around since 2009 or so (according to a WhoIs lookup), and most people wouldn’t spend 3 years on the internet doing something completely ineffective.

Quickie – Password Policies

So today, in order to use some of the new functionality at the University of Rochester’s wireless services, I had to change my password. This isn’t just any change – the new passwords must have symbols, numbers, and so forth. Also, to prevent some sort of Bobby Tables incident, certain symbols (I’m guessing SQL syntax) aren’t allowed. It’s nothing particularly draconian, but it does strike me that in most cases this sort of guideline is… somewhat slightly useless.

The key here is that once a user passes beyond the most obvious errors, like matching username and password or using a common word as the password, it becomes rather difficult to bruteforce someone’s passwords, especially if some degree of encryption is applied. I sure hope that security measures of some sort are used to keep UR’s passwords safe… but no guarantee. Still, even without it, a password merely composed of ASCII keys, such as, perhaps “{}{}{}{}[][][]a” would take thousands of years to break in the worst case, assuming high end current hardware, and even a government organization would need an impractical amount of time to break such. And considering that even the password storage on an internet service is often encrypted, we might want to worry a little bit less about our password security, and a bit more about other insecurities in our life… like, you know, like political corruption.

Gigahertz Just Bug Me: The Story of How Gabe Will Rant About Consumer Microprocessor History In Response To Consumer Ignorance

So have you ever spoken to a person about computers and had them brag about their new “3 gigahertz processor”? I sure have. And it’s aggravating.

Take a look at this. On the left is the “clock crystal”, which sends out pulses that synchronize the components of your computer. Everything in a computer has to synchronize to some base frequency, or you’ll lose performance as components will drift out of sync and therefore have to wait for pulses in order to do the basic bit-level operations that a computer does. The thing on the right is the Phase Locked Loop generator, which I’m not as familar with. It seems to regulate the processor’s voltage based on the clock crystal. Or is it the other way around? I’m not nearly as good with electric engineering as I would need to be to perfectly understand this.

But I disgress. If you’ve ever looked at a CPU, you’ll find they’re much bigger than the clock crystal. You’ll also find the amount of jargon you can use to describe a CPU is much greater – pipelines, caches, instruction level parallelism, cores, thermal design power. The point here is that you can not describe a CPU in terms of clockspeed alone. The clock crystal is the only computer hardware that I know of that can be described solely in terms of clockspeed, and you know how much work you can get out of a few billion uniform pulses per second?

That’s right. Nothing at all. So do me a favor – the next time that someone boasts about their processor on clockspeed alone, make sure they realize that they can’t do much with merely a clock crystal. A stupid joke, but it might raise awareness of these CPU differences.

With this all in mind, people need to consider that different CPU architectures perform differently at the same clockspeeds. This inability to do such prompted our giant friend Intel to design the “Netburst” architecture in the Pentium 4/D CPUs. They realized this microarchitecture blindness of the people, and therefore designed a processor entirely around achieving massive clockspeeds. The ancient documents claim that Netburst was supposed to scale into the 5-10 Ghz range, but suffice it for now to say they didn’t. When the first Pentium 4 came out at 1.5 Ghz, they ended up slower than AMD’s competing Athlons (at 1.2 Ghz) and even the Pentium III (at a “measly” 1 Ghz). The Pentium 4 continued to fail to compete with these lines until three things happened:

1. The “Northwood” revision of the chip improved performance per clock cycle with improvements that are probably too technical to describe briefly in this post,

2. Moving to a smaller semiconductor fabrication process allowed Intel to ramp up the clockspeeds as promised, from starting at 2 Ghz all the way up to 3.4 Ghz,

3. Which means that AMD, with less resources to throw at engineering, and a design that WASN’T built for mass clockspeeds, eventually were unable to raise their own clockspeeds fast enough to compete with Intel and therefore had to look towards new options to improve their performance, such as adding 64-bit extensions, and eventually producing dual-core dies.

Later, Intel hit a brick wall in clockspeed scaling at 3.8 Ghz @ 90 nanometer processes – it simply too far too much cooling technology to keep the CPU alive at such rates. So they had to do the same things just to keep Netburst “competitive” with AMD. In the mean time, they ended up scaling their “Pentium M” CPU (which evolved from the Pentium III)  up to the desktop and server sockets, and that’s how we got the Core 2 processor, and later, the “Nehalem” based i3/i5/i7 processors, which perform much better than the Pentium 4 ever did, and are almost up to the clockspeeds that Netburst achieved. This is great if you use your PC for heavy duty work, like 3D rendering or certain buisness applications, but there’s still some time before you actually NEED these processors for gaming, in which most Northwood based Pentium 4s will allow you to play the latest games.  Just don’t complain when someone’s 2.66 Ghz Core i5 outperforms your 3.8 Ghz Pentium 4.