Dropboxing for fun and profit

Dropbox is the shizzniz!

For those of you that dont know what it is, it’s a virtual drive on the internet that syncs stuff between your computers, and or other ppls computers depending on your settings!

I use it for like, if I find a new Linux distribution torrent at work, I can download that Linux distributions torrent file to my shared dropbox folder called “torrents”. Then microtorrent at my server mac at home (with the raided disk’s and all) finds it and downloads it. With a little luck I have a new Linux distribution to try out when I get home from work.

I also use it for a little project a friend of mine and I are doing. A development folder where everything is shared. It’s like source control only easier. (and it takes some time to synchronize, but we’re not in a hurry!)

The first 2 gigs are free, but if you invite someone you get 250 megs more. All the links in this blogpost are invites from me.

4 hour workweek, a review

Timothy Ferriss is a guy that knows what he wants and he doesn’t mind telling the rest of us how he got it. He does this in his book “The 4-hour workweek”. I read it, I liked the ideas about not being stuck in the hamster wheel, still I find some of the approaches he takes are a bit to much about one-self and not for the greater good of the world. Don’t get me wrong, I’m not a great person that has empathy for everyone. But I do not like the “low-salary countries outsourcing” Timothy is so keen on. Sure I could start a company try to optimize it to spend as little time on it as possible, but moving to a country where it’s cheaper, just so that I can get more luxury isn’t my dream. Whilst the book caters to the needs and wants of many persons I’m disqualified because I don’t really feel like re-locating or traveling that much and I dont approve of the master suppression techniques that is part of his gospel.

Still I’d recommend the read, the book makes you think and forces you to evaluate your standpoint in life. I had to, and I grew a bit as a person.

Hex arduino shield

Yesterday I was chatting on the internets with two gentlemen (I think) herr_prof and k9d-925. Our intention was caught about and Arduino synth with Stylophone input method. That and a hex input methods like this and the Thummer these pages and all those Arduino synth’s that is coming out now made us fuse together an idea of making a hex input device for the Arduino. perhaps as a shield. Yes a shield. As I see it there are three solutions.

1. make a shield with touch plate and a pen. old school Stylophone style. Pro’s Easy to make, easy to build and dead cheap. Cold use many pins. Introvert playing. Only one not at the time.

2. Same as above but with buttons. Removes the con’s of one note at the time, and you could be more expressive. But it’s more expensive.

3. A touch-screen. like on the Nintendo DS or. It’s 9 dollars but you only need 4 lines to it. Or a touch pad from a laptop. Pro’s less pins from the Arduino, still easy to make use. The touch pad is transparent so you could put different layouts behind it. It’s also customizable that way, and you probably cold use all the different synths easier for the Arduino since it’s already uses so few pins (like the critter and guitari piano shield) still, it’s pretty introvert.

So, what to do, a shield with stylophone style? another button-controller, dont think so, that there are a plenty already, just need to place the buttons at new locations.  Perhaps a Nintendo DS touchscreen will come my way. Or a touchpad from some old computer. But I kinda like the see-through and make  your own layout thing 🙂

Voice-drone experiment

So, I was thinking, wouldn’t it be “cool” to create a drone-track with nothing but human voices?  The problem is that I cant hold a tone for very long, and that my singing-voice isn’t all that clean. I however did not hesitate a single second to try making a drone-sing-thing. Imagine how cool it could be if it where done for real!?!

How to succed in coding optimized programs.

Most people cant be race-car drivers, yet they can drive a car. Same goes for programmers, most optimization of the code is today done by the compiler. So there is seldom any need to manually optimize loops or fiddle with the small things. This however does not excuse giving up optimization or making your program to work as snappy as possible. Here are a few steps, I will explain them after but these are good to copy paste into your word-document, print and put near your computer.

  1. Choose the correct algorithms for the problem you are solving.
  2. Write readable functional and documented code
  3. Test (on the hardware you are gonna run it on)
  4. Analyze the test’s and find the weak-spots.

Choose the correct algorithms for the problem you are solving.
This might seem obvious, but it’s not and it is the step you’re gonna correct most of the time. There are in normal software development to many variables to keep track on to choose the correct algorithm the first time. This does not mean you’re a bad developer. It’s just life.

Write readable functional and documented code.
In this step, don’t pre-optimize, don’t write hard to read code just because you can or want to show off how smart you are to the few other that could be reading the code you write. The longer it takes to understand the code you are writing, the longer it will take to fix bugs, and the slower bug fixes and new features will come to the user of your program. Now who do you really care about? think about it! Why document you ask? well, because if you write in plain English (or whatever your preferred tongue is) you explain what the code is supposed to do, if someone finds out that it doesn’t do as described the bug is probably there. Coders who say “all you have to do is read the code” has it all wrong. Think about it like a destination and driving instructions”. If you only get the instructions like this: “take a left, walk 2 houses, take a right ….” without the destination clear someone who knows the destination and how to read and write instructions wont be able to fully understand.

Test (on the hardware you are gonna run it on)
You probably have a decent to really fast computer. Do your users have that? do they need to? If you’re writing for a microprocessor or mobile-phone or similar. there is one thing I can tell you, DON’T TRUST EMULATORS. There is always small but crucial differences on running on your computer or on the actual device. It could be they way you’re holding it, the way it reads from file-system. What I’m telling you is that there is no substitute for testing it on the hardware the costumer is gonna use your program on. The sooner you test it on hardware the sooner you’re gonna find the things about your program that sucks, and you’re able to fix them. The sooner the better!

Analyze the test’s and find the weak-spots.
Did you choose the correct algorithm to solve your problem? is there a performance bottleneck somewhere that you didn’t thing of? Fix it.

Most importantly do this for every feature added. If your writing something for a platform other then the one you are writing code on, test on hardware as often and as soon as possible or you will fail.

This was a nice little Saturday morning rant. I should do this more often, I was actually angry while typing. And I borrowed a lot of the language from a book I’m going to review in a little while!

Dronesizer pt 1

Excellent news everyone. I’ve begun working on my Drone Synthesizer. I decided to use an Arduino for the generation of audio, and a simple Digital to Audio Converter in the form of a resistor ladder.  I have one of these at home and code that sends very basic waveforms to speaker out since this summer. Me and Puterman was starting to make an Arduino demo for Compusphere (a demo scene event) I made all the hardware for TV-out and sound out, but that was as far as we got. Good for now tough. I had it all done so I could start the coding. Awesome.

I’ve done a large batch of the coding, and it does sound rich and fat with and it takes very low CPU. I had not problem adding 4 voices with my engine, witch was in part inspired by gieskes hard softsynth 2. This here tutorial on make magazine on how to make a resistor ladder for the Arduino is good, not what I used but I could not find that original place I read this summer.

So I now have to think on what I should add to my Dronesizer, I really want distortion, but I can use my distortion-tester for that. Also low-pass band-pass and high-pass filters would be awesome. Perhaps an EQ then 🙂 Maybe a delay or echo just to fatten shit up. I also have to think of how I want to control the Dronesizer. I have at-least 15 parameters to control. Also I want something nicely visual to spicen the stuff up.

So now I’m looking for information on that stuff. Life is great!

Dronesizer

I want a drone-machine. You know something for creating rich drones. and by rich I mean distorted and noisy. http://casperelectronics.com/finished-pieces/drone-lab/drone-lab-v2/ might be one of the nicest sofar, and I think I’ll get me one of these. I just have to sell the Roland SP-404 first.

In the mean-time I’ll design and build one myself. Perhaps that will be good enough for me, although the casperelectronics one has some real nice features I wont be able to do.

So I’m thinking using one Arduino, with a DAC out, a resistor ladder DAC, building on an experiment I did a while ago. With some nice waveforms, and analog pot’s to control the drones. Then maybe I’ll build a few distortions to hook into the audio-path. And perhaps … something more. Now where did I my resistor ladder code.

RAIDing the os x

A friend of mine David, lost all his stuff due to hard rive failures, not one, not two, but three failures over a year. When his second drive failed and all that data was unsaveable I decided to get a proper backup system going. I did not want to loose all my songs, my photos or my source code, not that either of these will save the planet but they are important to me.

So my old way of burning stuff on DVD’s where out of the question, that took to long and besides, with the cheap DVD’s I buy it’s not like I would be able to recreate the data again. So hard-drives then or an internet-based backup then? well, I save some stuff with drop-box (free version)

Then I made a OS X mirrored raid. It’s dead easy, just follow these steps:

  1. Buy 2 identical external disks (I bought 2 1tb USB2.0)
  2. Connect them to your computer
  3. Open Disk Utility
  4. Create a new Mirrored Raid in Disk Utility and drag-drop the two new drives onto it.
  5. Press yes yes OK finish
  6. PROFIT!

This was dead easy, but as it turns out, there are no warning mechanisms in OS X, the best you can do is to use the console to do a diskutil checkRAID to se of they are online. This was not good enough for me so I did a quick versiontracker search and found a program (that I guess just calls that command) and screams,emails shop dialogs when either drives are offline. It’s called RAID Eye and I guess having that is better then having a pink eye 🙂

Now I’m secure, and I wont lose a all my shit, and there is plenty of space for my wife to put her stuff on as well.