Softcore software development
It's all about the cycles
  • Home
  • About

Golden era of music

music Comments Off

I recently wrote this on my Facebook wall but it didn’t get much of a reaction. I also posted this with a soundcloud link, which was probably a mistake (people probably felt obligated to listen before replying, which was not my intention). Anyways, the quote was:

Listening to some italian dub. So much amazing music from around the world no longer constrained by media (vinyl, cds, tapes), record deals, location, or money. We really live in a golden era of music right now.

Artists are really able to reach a world-wide audience now. Something that was never possible in the 90′s without a lot of money (distrubution, tours) or luck. But today, a person just needs an intstrument (or a $500-$1000 piece of software), a mic, and an internet connection to reach the world.

Thus far, I have listened to tracks from France, Argentina, Italy, Germany, South Korea and releases from Poland.

So when I hear that the golden age of music has passed, I just smile. While no doubt that musicians and bands such as the Police, Queen, Michael Jackson, or Louis Armstrong had incredible influence, to say that it was the golden age of music is rubbish when 4/5ths of the world was ignored for decades (yes, ok, fine. There was Abba but they were a few of the exceptions and not the rule).


April 28th, 2012 |

Tags: music, souncloud




A breakdown of building Firefox

programming Comments Off

John Ford posted an interesting post on improving the build times of mac minis. This largely turned out to be a hardware solution (spend enough money on solid state drives and more cores and things are likely to improve). But that is expensive. What is interesting to me though is the build times. 2 hours for a dual core set-up?

For a long time the only really thing you can do is pass -jN. -j merely parallelized the process. It was a good idea to have -j2 even on a single core just so that the CPU was busy doing something. That was often the weak point, you just couldn’t compile fast enough.

Of course, now we have dual-tri-quad cores, so now it wasn’t how fast you can compile but how fast you can write to disk. Solid state drives can help close that gap.

But Firefox is a huge project. At some point the cost of hardware to compile it in 10 seconds is just too significant, even for Mozilla with it’s fancy new Google-deal.

I wondered where the build was spending most of its time. I couldn’t find anything to profile make (at least not through the man page, and the name is not google friendly, and people don’t call it gmake anymore ;) ). Since what I want to do is pretty simple, I downloaded the source and made a few changes to log the seconds since epoch when we enter/leave a directory. A crappy python script later, and here is the broken results:

Total time for accessible is 77 seconds. Project was entered 3 times
Total time for b2g is 0 seconds. Project was entered 0 times
Total time for browser is 13 seconds. Project was entered 3 times
Total time for build is 0 seconds. Project was entered 3 times
Total time for caps is 6 seconds. Project was entered 3 times
Total time for chrome is 6 seconds. Project was entered 3 times
Total time for config is 0 seconds. Project was entered 3 times
Total time for content is 572 seconds. Project was entered 3 times
Total time for db/sqlite3/src is 7 seconds. Project was entered 3 times
Total time for dbm is 0 seconds. Project was entered 0 times
Total time for docshell is 16 seconds. Project was entered 3 times
Total time for dom is 223 seconds. Project was entered 3 times
Total time for editor is 56 seconds. Project was entered 3 times
Total time for embedding is 23 seconds. Project was entered 3 times
Total time for gfx is 106 seconds. Project was entered 3 times
Total time for hal is 6 seconds. Project was entered 3 times
Total time for image is 18 seconds. Project was entered 3 times
Total time for intl is 31 seconds. Project was entered 3 times
Total time for ipc is 186 seconds. Project was entered 3 times
Total time for js/ductwork/debugger is 1 seconds. Project was entered 3 times
Total time for js/examples is 0 seconds. Project was entered 0 times
Total time for js/ipc is 3 seconds. Project was entered 3 times
Total time for js/jsd is 3 seconds. Project was entered 3 times
Total time for js/public is 0 seconds. Project was entered 0 times
Total time for js/src is 17 seconds. Project was entered 4 times
Total time for js/xpconnect is 61 seconds. Project was entered 3 times
Total time for layout is 378 seconds. Project was entered 3 times
Total time for media/libjpeg is 3 seconds. Project was entered 3 times
Total time for media/libnestegg is 0 seconds. Project was entered 3 times
Total time for media/libogg is 1 seconds. Project was entered 3 times
Total time for media/libpng is 1 seconds. Project was entered 3 times
Total time for media/libsydneyaudio is 0 seconds. Project was entered 3 times
Total time for media/libtheora is 2 seconds. Project was entered 3 times
Total time for media/libtremor is 0 seconds. Project was entered 0 times
Total time for media/libvorbis is 2 seconds. Project was entered 3 times
Total time for media/libvpx is 3 seconds. Project was entered 3 times
Total time for memory/jemalloc is 0 seconds. Project was entered 3 times
Total time for memory/mozalloc is 0 seconds. Project was entered 3 times
Total time for mfbt is 0 seconds. Project was entered 3 times
Total time for mobile is 0 seconds. Project was entered 0 times
Total time for modules/freetype2 is 0 seconds. Project was entered 0 times
Total time for modules/libbz2 is 1 seconds. Project was entered 3 times
Total time for modules/libjar is 6 seconds. Project was entered 3 times
Total time for modules/libmar is 1 seconds. Project was entered 3 times
Total time for modules/libpref is 7 seconds. Project was entered 3 times
Total time for modules/zlib is 1 seconds. Project was entered 3 times
Total time for mozglue is 0 seconds. Project was entered 3 times
Total time for netwerk is 126 seconds. Project was entered 3 times
Total time for nsprpub is 2 seconds. Project was entered 2 times
Total time for other-licenses is 0 seconds. Project was entered 0 times
Total time for parser is 29 seconds. Project was entered 3 times
Total time for probes is 0 seconds. Project was entered 3 times
Total time for profile is 3 seconds. Project was entered 3 times
Total time for rdf is 14 seconds. Project was entered 3 times
Total time for security/coreconf is 0 seconds. Project was entered 0 times
Total time for security/dbm is 0 seconds. Project was entered 0 times
Total time for security/manager is 109 seconds. Project was entered 3 times
Total time for security/nss/lib is 0 seconds. Project was entered 0 times
Total time for services is 2 seconds. Project was entered 3 times
Total time for startupcache is 3 seconds. Project was entered 3 times
Total time for storage is 28 seconds. Project was entered 3 times
Total time for testing is 0 seconds. Project was entered 0 times
Total time for toolkit is 88 seconds. Project was entered 3 times
Total time for tools is 0 seconds. Project was entered 0 times
Total time for uriloader is 19 seconds. Project was entered 3 times
Total time for view is 2 seconds. Project was entered 3 times
Total time for widget is 40 seconds. Project was entered 3 times
Total time for xpcom is 85 seconds. Project was entered 3 times
Total time for xpfe/appshell is 8 seconds. Project was entered 3 times
Total time for xpfe/components is 3 seconds. Project was entered 3 times
Total time for xpfe/test is 0 seconds. Project was entered 0 times
Total time for xulrunner is 0 seconds. Project was entered 0 times
The total time calculated is 2398

The total time is off. Firstly, you’ll see NSS is not being tracked. What usually happens is that the Makefile is generated in the object directory. In the case of NSS, it comes with a Makefile already. This is breaking my script, but it takes approx. 72 seconds.

Secondly, The totally time since I ran “make -f client.mk build” is approx 2662 seconds. Even factoring in the NSS time, that still leaves 3 minutes unaccounted for. So I still might be missing some projects. Part of that time was spent traversing the tree and running configure.

In the past, when we only had single-core computers, we tried fixing the problem by using tools like distcc to distribute the load to slave machines. With multi-core machines, this is less and less ideal since the overhead is quite substantial (a preprocessed file would go through and object files come back). However, I wonder if we can achieve better build times by distributing projects across machines. That would present some challenges (like dependencies), but it might give better results.


January 23rd, 2012 |

Tags: build, bungineer, firefox




Waking up your computer at a certain time

Living Comments Off

The goal of my alarm clock website was to actually be my alarm clock. For this to happen, I thought I would need to have my computer running all night long which seemed like a waste of electricity. It turns out, you can schedule your computer to wake up at a certain time by using the task scheduler.

So now I have it wake the computer up at 7:50 so that in 5 minutes it can play the nightingales before playing the Good Morning Dub. One issue though is that Windows will go back to sleep in 2 minutes. You can modify that using a registry key so that it will have enough time to play the music.

Now while the alarm clock website is accomplishing the task of waking me up at the right time, it doesn’t do a very good job of keeping me awake. Maybe I need to make an interactive component to shut off the alarm :)


December 22nd, 2011 |

Tags: alarm, audio, sleep




Image prefetching

programming Comments Off

As part of a personal website I am doing, I transition between several large (1920 pixels wide) images. It is beneficial for me to do two things :

  1. Cache the images so they don’t keep taking up my bandwidth
  2. Prefetch the images so that a noticeable lag isn’t taking place while the image loads.

Caching is a bit tricky. While I want the names to stay consistant, I also want to be able to change the images at anytime. What I want is the browser to cache kitten.jpg until next year, or until I decide that I want a different kitten image and it should pick the new kitten.jpg (almost) immediately.

I have seen this problem solved in Ruby on Rails. What they did is append some query string identifier as part of the image. So instead of retrieving kitten.jpg, you would retrieve kitten.jpg?mittens. When the image changed, so did the identifier to something like kitten.jpg?bucket. This lets you cache aggressively, while still being able to change the image fairly regularly. (I am aware of other headers such as Last-Modified that might be a better solution. But from my understanding that only works with documents and not images. If an image is cached, the browser will use it until it expires as opposed to doing a HEAD request to see whether the Last-Modified date changed. I could be wrong about this).

I decided to do something similar, in that the md5 of the file will be appended.

The other thing I was missing was prefetching. I understand I could easily do this by hiding a bunch of images in the HTML page, or dynamically creating an Image object and setting the source. But this is 2011 dammit. We have standards that were promised, and behold link prefetching! It turns out only Mozilla and Webkit support this, which is lame. But that’s fine considering this website is only for my use.

I put in a pretch link using this method and used Firebug’s net panel to see whether it was working. And apparently it didn’t. I found out much later on that Firebug doesn’t capture it. You have to look at the server’s access log so see whether the image was retrieved.

Next, I checked out Mozilla link prefetching FAQ, which informed me that URLS with query strings are not prefetched. I found out much later that this is a lie (and removed it). This was actually fixed back in 2003 by someone who also thought it was stupid.

So here I am, also at 01:00. Reheated a plate of pasta and now enjoying some lukewarm soup. I promised myself yesterday I would be in bed by 23:00 at the latest. Tomorrow will be unpleasant, but at least this feels accomplishing.


November 30th, 2011 |

Tags: cache, derp, prefetch




Sharing a django project

programming Comments Off

I have been working on a Django application for a few weeks and want to put it on my website. Tom suggested that I put it on bitbucket as a private repository and then pull it from my server since there is no direct way to pull it from my computer.

I’ve decided to just zip up the thing and ftp it. But I found it interesting that Django projects are actually not trivial to share. For example, what files would you include?

It actually seems like you are not supposed to share settings.py (nor manage.py, or urls.py really. These are auto-generated for you). At least, the secret_key should be secret. But you also have a bunch of settings such as database information that should not be public either. If you change the file, any version control system will declare it as a changed file. If you .(git|hg)ignore it, what happens if you need to add a new setting to settings.py?

So I thought maybe you share django apps instead of the project? That’s stupid. My project has templates, static files. Are those supposed to be a separate project?

So it looks like a fucking mess and I’m zipping this shit up and calling it a day.

After seeing what Zamboni does, it appears they modified the manage.py to load a settings_local.py file instead of settings. So you would copy settings.py to settings.local.py and use it. That’s actually a pretty good idea.


November 29th, 2011 |

Tags: django, mess




Flash, Silverlight, and the future of the web

Web Comments Off

The big news today (November 9th) is the announcement that adobe will be halting development for flash on mobile devices and the rumor that Microsoft may end development of Silverlight in the near future. Many people have hailed it as a major victory for the web, largely to the wide adoption of HTML5 by browser vendors. Robert O’Callahan, speaking for himself and not for Mozilla of course, suggested that this could spell the end for NPAPI. I find myself feeling pretty conflicted about this. While I finally think it’s about time we move certain functions out of flash and into the browser, I am concerned about the impact of this and the possibility of NPAPI removal.

Down with the system, long live the system!

One of the great joys of Firefox is that if you don’t like something, you can change it (for the most part). This was mainly done through extensions. Don’t like the default developer tools? Get something better! Concerned about privacy? You’re in luck! You did not need someone’s blessing or permission, you could just write it. Sometimes an extension is not ideal. I don’t believe you can override C++ components in Firefox, and you might have limitations to the functionality you can override depending on the browser.

For many browsers, you could write a NPAPI plugin. The benefit of this is that Flash was able to do so many things that has really only been possible in the last 3 years or so. Canvas, video, audio, offline storage was never possible without Flash when I started college. And yet it has so much influence because we knew what was possible and what was important.

We are slowly replacing Flash sure. Even the webcam might one day exist on the desktop. But you can’t have a API and a spec for everything. You just cannot satisfy everyone’s requirements. You can advocate, but the eventual decision will lie in the hands of browser vendors. Having the web compete with itself is not ideal, and we see that when you have to encode a video twice for everyone to play it.

Which is why I having a plugin service is important, and removing it is a step back. It’s not pleasant or perfect, but if it makes a web competitive outside of browser vendors, I think it’s worth it.


November 22nd, 2011 |

Tags: flash, plugins, silverlight




Keeping your address updated

Living Comments Off

As someone who has moved about 3 times in 8 months, I have unfortunately discovered the pains of changing addresses across the broad spectrum of services I am using. I have been thinking lately of something to make this a smaller headache. Much like OpenID makes logging in a more pleasant experience.

But the challenge really is – will anyone use it? And how do I convince people this is a good idea? Maybe good ideas do not need convincing, they just need creating.


October 18th, 2011 |

Tags: frustration, microblog, moving




Finding new music

Uncategorized Comments Off

There are several tools to help people discover new music. Two off the top of my head are iTune’s Genius and Beatport’s BeatBot. I have not tried Genius, but I have tried BeatBot. It is a hit or miss feature, with greater emphasis on the miss. Understandably advising on something as complex as musical tastes is no easy task – and probably dangerous.

Genres in particular are very fluid. Even though we have hundreds of genres and sub-genres, it is not uncommon for there to be ambiguities and mixes of several types of genres. It took me a while to discover the difference between trance and house music, and even today it puzzles me. A lot of the blame is due to mislabelling or generalizing of artists and albums but that is another topic.

Musical preferences is also very different between people who like even the same genre of music, because the genre itself has changed and evolved. If you listen to early dubstep (Girl from Codeine City by L-Wiz) and more recent dubstep (Game Time by Zomboy) tracks, they are two different sounds. Though, I’m fairly sure each classifies as their own sub-genre by now.

When you try to mix these two algorithmically, the results do not hold great promise. At least, in my case. If you ever listen to tsubaki, his sound is pretty unique. Beatbot will return some reggae (getting warmer), hip hop (colder), and dubstep (colder). Nothing of which sounds comparable.

Recently though, I found tsubaki on soundcloud. More importantly, soundcloud lets you see what other artists that artist is following. And I now found another artist that makes similar music – dubsalon. So here we have the artist recommending (or at least, listening) to another artist.

This is something that I think we should take advantage of, if not already (which I think we do not). This information is a bit more difficult to harvest, but might be more useful.


October 18th, 2011 |

Tags: beatport, genres, music




Thoughts on Rails

programming, Web Comments Off

I have been working the past few weeks on Ruby on Rails web development framework. My experience with Ruby is minimal, so there was a large amount of learning and re-learning that was required. Working on it full-time for the past week or two, I reflected on some of the pros and cons of the language and framework:

  • Ruby blocks are *fantastic*. If you ever had to work with generating XML, I highly suggest Nokogiri to generate and parse XML documents. XPATH? Yes please! (Ok, XML sucks but when you have to use it, this library makes it painless)
  • Rails has a ton of shortcuts that make development easier. They have a ton of HTML helpers to auto-generate HTML. The framework takes some getting used, but it works quite well.
  • Rails expects you to develop a certain way. IMO, this a very negative attribute until you get used to it. Your controllers names MUST be plural (cashiers, merchants, etc). Your models MUST be singular (cashier, merchant, etc). Breaking the rules leads to frustration and headache.
  • Rails expects you to build a certain way. In my application, I did not need to use a database (everything is done using a REST service). But Rails makes this difficult to do.
  • The Rails installation procedure is easy, but a bit too easy ;) I managed to screw up a few times (shame on me) and just did gem install rails. That will install the latest Ruby on Rails on your machine. The problem is when I had to move my code to the server. Between development, rails went up a few versions (from 3.0.x to 3.1.x) and a lot of stuff broke. I wish at the time I knew I can install a specific version. Which leads me to…
  • Rails is difficult to update. Well, so are most frameworks. I think we need to get better at this developers…

It is difficult to say whether I enjoy Rails or Django. I am definitely more comfortable with Django, but it is great getting to know both. I am still a newbie at Rails, so hopefully things get easier as I do more work on this.


September 8th, 2011 |

Tags: rails, ruby




WIND away is horseshit

Uncategorized Comments Off

I recently had a problem with my WIND account. I was being charged data that I could not figure out where it was coming from. I had a social blackberry which allows unlimited Facebook/BBM/twitter which I use. When I try to access a website, my blackberry will stop me saying that I do not have a data plan.

I went to the WIND store and complained. They offered a solution where all data that was not covered under the plan would be disabled. That was an ideal solution, so I accepted it. I had to call customer service if I wanted to dispute the data charges.

A week later and I was still being charged data. I called them up to dispute the charges. After talking to a representative (two actually. The first one I lost connection with), it turns out that I was accessing data on a WIND away zone. The horseshit term they use when you are outside their network coverage.

I live/work/play in downtown Toronto…

The last data charge was around 8pm. That was about the time I was exiting the YMCA… in downtown Toronto.

If you check their coverage map, downtown Toronto saturated as a WIND Home zone. I was apparently hitting a WIND Away zone.

This isn’t unheard of, nor unique to WIND. A friend complained that Fido once charged him an obscene amount because he was hitting a US tower while in Victoria BC. Oh yes, that will be quite a bit of roaming.

I was refunded $2 as a one time good gesture. Because I switched numbers when I went to the WIND store, they could not refund me the amount from my previous number. It was a net loss of $14 on WIND’s crappy network coverage. The only solution they offer is to call WIND and have them remove any WIND away coverage. This is not ideal in the situation that I am in one of WIND’s away zone and I will need to use my phone in an (non-911) emergency. So I would have to remember to call and re-enable it. Very inconvenient. In fact, the correct solution is for WIND to deliver the coverage they promise. Maybe they should learn a thing or two from Verizon:

http://youtu.be/OPwPo-IAQ-E

I hope that network coverage improves. The offer really good rates, but at a major cost of reliability and coverage. I will be with them for at least the next few months until I can get my phone unlocked. Let’s see if I stick with them in the long run.


August 28th, 2011 |



Previous Entries
  • Categories

    • addons
    • beatport5
    • hugs
    • Living
    • music
    • personal
    • programming
    • Uncategorized
    • Web
  • Recent Posts

    • Golden era of music
    • A breakdown of building Firefox
    • Waking up your computer at a certain time
    • Image prefetching
    • Sharing a django project
  • Tags

    "open source" activism audio beatport browser compatibility bug chrome editor extension fennec google chrome house html5 hugs ie intern jquery json konqueror lazy microblog microsoft mozilla music nsid opera personal prism python regina ria safari security seneca shaving shoes sleep svg tinderbox tip toronto UX Web wildon windows error
  • Archives

    • April 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • June 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • July 2010
    • May 2010
    • February 2010
    • December 2009
    • November 2009
    • October 2009
    • August 2009
    • July 2009
    • February 2009
    • January 2009
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
RSS XHTML CSS Log in
Copyright © 2012 Softcore software development All Rights Reserved
Wp Theme by i Software Reviews
Proudly Powered by Wordpress