r3dux.org

A number-pimping side project from the valleys in *NEW* upside-down flavour.

  • Home
  • ABOUT
  • OLD SITE
  • SEARCH
  • FEEDBACK

To Work Towards Good

r3dux | October 22, 2011

Somebody said this to me once, and I took note of it:

I am a student, and I will always be a student. I will graduate life when I am dead, and perhaps move on to post-graduate work. Until then, every day will see my continued education and I will always assume that every flower, fruit and stone I see holds some undiscovered secret within.

Furthermore, I am a hacker. I take nothing for granted – not the way software functions, nor the way the laws of physics are applied. I will always question the reality around me and seek to refine the answers that I have found.

Some others want to silence my nature and force me to take their word as the final truth – they are the high-school dropouts of this world, ignorant to every new truth that passes them by. But I can learn from them as well.

There are no negative consequences in my life, only education and experience. I have no regrets. My first day of life and my last are equally valuable to me, no matter how many years seperate them.

Besides, anyone who believes that hours of creativity (and programming is an art, not a science, as far as I’m concerned) can be compensated by a paycheck is deluding themselves. Free software allows a programmer to trade one esoteric thing for another – creativity for community, perseverance for recognition. And the programmer who does so will be fulfilled by it, and can thus tolerate selling other of their works for money.

-Elentar

Comments
1 Comment »
Categories
Life
Comments rss Comments rss
Trackback Trackback

Death Cab for Cutie – You Are A Tourist

r3dux | October 19, 2011

My current fave track off DCfC’s recent album Codes and Keys…

YouTube Preview Image

Great song, but I’m not entirely convinced by the video.

Also, from the forthcoming DCfC remix album Keys and Codes comes this 2 Bears remix of the very same [Warning: May contain traces of disco] =P

YouTube Preview Image

Comments
No Comments »
Categories
Music
Tags
Codes and Keys, DCfC, Death Cab For Cutie, Keys and Codes, Remix
Comments rss Comments rss
Trackback Trackback

Me vs. Software vs. The World, or How to transition from Alpha to Beta

r3dux | October 16, 2011

Race Day

Concept (left) meets Reality (right)

Things like this are hard to write – but today has been one of the best days of my life.

I’ve spent the last two weeks writing a receipt system for a bookmakers, so they can rock up to a race meet (horses), place a big board of odds, and take and give a lot of money. I was asked to write the software to keep track of it all, and I did – by working 12 hour days and finishing on a final 22 hour coding session to get it all up and running a whole 15 minutes before leaving for “delivery”.

I wrote it in a language foreign to me (Java) so it can run on anything, I hadn’t tested it very well, and I didn’t know if it would work in the real world until it got to the point of taking multiple crisp $100 bills off gruff, semi-drunken people at the race track.

To back up a second, the game here is “doubles” – you pick a horse to win in one race, and another horse to win in any other race, and you get the multiplied odds if both horses win – for example, Race 1 Horse 2 has 10 to 1 odds, Race 3 Horse 4 has 20 to 1 odds, so you get (10 x 20) 200 to 1 odds, and if you then place $10 on that combination and both those horses win you’re in for a $2,010 return. Sounds simple enough to keep track of, right? And on paper it is – but the devil is always in the details.

So I worked on the details, and it got the the point where money was changing hands. Real money. And lots of it. All going through my software. So if things failed now, it would be… bad.

But nothing did: Every race to perfection. Every bet to the (Australian rounded) nickel. Every composite object to the correct [serialized/deserialized] binary stream, every fat-fingered illegal input handled gracefully. 0 crashes. 0 errors. 0 fuck-ups.

I won’t deny it: for how last-minute, and with how little testing got done, I got lucky – but that doesn’t change the fact that everything worked perfectly: first-time.

I knocked it out of the park.

Awesome =D

Comments
3 Comments »
Categories
Coding, Life
Tags
Bookmakers, Development, Java, Races
Comments rss Comments rss
Trackback Trackback

How-To: Initialise arrays of objects in Java

r3dux | October 7, 2011

You might think, like I did, that if you create an array of objects in Java then the constructor is automatically called on each object as part of the array creation process. But you’d be wrong.

Creating an array merely creates the object references – you have to instantiate each “inner” object in the array as a separate step if you want to be able to, ya know, do stuff… I think this is because in Java an array is an object – like, quite literally a single object that can be passed around like a single thing.

An example, perhaps?

Person Class

public class Person
{
	private int number = -1; // Each person gets a default number of -1 on creation
 
	// Default constructor
	public Person()
	{
		// The number property is left as -1 as per the default value specified above
	}
 
	// One parameter constructor which overwrites the default number value with a specified value
	public Person(int theNumber)
	{
		number = theNumber;
	}
 
	public void displayNumber()
	{
		System.out.println("My person number is: " + number);
	}
}

PersonTestDrive Class

public class PersonTestDrive
{
	final static public int MAX_PEOPLE = 3;
 
	public static void main(String[] args)
	{
		// Create an array of people. You're not creating any new People objects here - you're creating a new Array object
		Person[] people = new Person[MAX_PEOPLE];
 
		// *** INCORRECT : The Person objects in the people array don't exist yet! They're only references at this point! ***
		// for (Person tempPerson : people)
		// {
		// 	tempPerson.displayNumber(); // This doesn't give "-1" for each person, it gives a NullPointerException!
		// }
 
		// *** CORRECT : Instantiate each Person object in the array before accessing them! ***
		for (int loop = 0; loop < MAX_PEOPLE; loop++)
		{
			people[loop] = new Person(loop+1); // Create the Person object, setting the number property in this case
 
			people[loop].displayNumber();      // Now it'll output "My person number is: 1" etc. as expected
		}
	}
}

Comments
5 Comments »
Categories
Coding, How-To
Tags
Array, Constructor, Exception, Initialise, Java
Comments rss Comments rss
Trackback Trackback

Gillian Welch – Everything is Free

r3dux | October 5, 2011

There’s some really beautiful tracks on Gillian Welch‘s Time (The Revelator) album (recorded way back in 2001, no less), and I’ve been flitting between different ones as my favourite for the last few days. After much pondering I guess this one kinda speaks to me the most.

So don’t fear the country music section, and remember – if anyone asks if you’re listening to country, just pass it off as bluegrass and make good your escape while they ponder the *difference!

* = In the interest of full disclosure I only know the difference because I just looked it up! =P

Gillian Welch - Time (The Revelator) album cover

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Everything is free now, that’s what they say
Everything I ever done, gonna give it away
Someone hit the big score, they figured it out
That we’re gonna do it anyway, even if doesn’t pay

I can get a tip jar, gas up the car
And try to make a little change, down at the bar
Or I can get a straight job, I’ve done it before
I never minded working hard, it’s who I’m working for

Everything is free now, that’s what they say
Everything I ever done, gotta give it away
Someone hit the big score, they figured it out
That we’re gonna do it anyway, even if doesn’t pay

Every day I wake up, hummin’ a song
But I don’t need to run around, I just stay home
And sing a little love song, my love, to myself
If there’s something that you want to hear, you can sing it yourself

‘Cause everything is free now, that’s what I said
No one’s got to listen to, the words in my head
Someone hit the big score, and I figured it out,
And I’m gonna do it anyway, even if doesn’t pay

Comments
No Comments »
Categories
Music
Tags
Bluegrass, Country, Everything is Free, Gillian Welch, Time (The Revelator)
Comments rss Comments rss
Trackback Trackback

« Previous Entries Next Entries »

Translate

Categories

Archives

Tags

3D ActionScript ActionScript 3.0 Adobe AI Ballarat Bash C++ Class Convert CS4 Effect Error Film Flash GLSL Gnome Hack How-To install Jaunty Java Kinect Linkage Linux Mash-Up Microsoft Motion OpenGL Particle Problem PS3 Remix Retro script Slides Sound Systems Texture Ubuntu Video VirtualBox Wii Windows XBox

Gamercard

OpenR3dux

Misc.

Flattr this

RSS Feed

r3dux twitter feed



“Wall of Text crits you for 9999 damage.”

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox