..to point to http://blog.amromousa.com — I switched to Posterous recently.
Author Archive for amro
Hilarious app. So I monkey patched Smule’s javascript to get the m4a URL. Lame that they don’t just give a link.
1) Record a song
2) Share it
3) Go to Smule’s play page in Firefox
4) Open up Firebug and paste this into the console:
sendPlayerAction = function(action, param) {
var url_prefix = 'http://smule-media-app.smule.com/tpain/';
var file_ext = '.m4a';
var file = url_prefix + param + file_ext;
var player = getPlayer('playercontainer');
console.log("FILE URL: " + file);
player.doAction(action, file);
};
5) Hit enter
6) Hit play and the file url will be printed into the console
7) Download it w/ your favorite HTTP client and you’re set
Programming can be incredibly entertaining. And I don’t just mean finding hex arrays with 17 entries either. Programmers benefit from a wide range of languages — tools to get the job done. Sometimes, it’s easier to use one language over another (e.g. don’t write an app in C when a bash script will do). When asked about their favorite language, many nerdy types will probably throw out Ruby or Python. Generally speaking, only masochists will say Java or C. Whatever. Every so often, you’ll meet a crazy AND nerdy person who will respond Objective-C. I’m crazy and nerdy.
So Hamed asked if I wanted to help write the first Radio Javan iPhone app. Naturally, I said yes. At first, I wondered WTF was up with all the brackets. Don’t worry, they grow on you. The @ before NSStrings is a little strange at first too. I like it. In fact, I like it so much, I try to use it when writing other languages (O.o). Objective-C has other quirks, too, like the crazy-long-and-oddly-amusingly-verbose method names. I guess I’m trying to say that Objective-C is really cool and it’s a shame programmers are scared of it. Objective-C is just plain sexy (as far as programming languages go). I’ll admit that I’m not much of a fan of lower level languages, despite knowing their usefulness. Srsly, do yourself a favor and learn Objective-C.
I hear the same pitch, over and over: I have this widget. It lets you write <insert high level language that everyone already knows here> and it spits out <insert lower level language and its UI toolkit here>! It saves so much time and it’s easy and it lowers time to market and and and you can even write Java! There’s ALWAYS Java going on with these things, for some reason. NO! Bad idea.
Well, let me be clear about it. The idea itself isn’t so bad; it’s the HORRIBLE implementation that almost always comes along for the ride. There are exceptions, of course, but I contend they’re the minority.
There is generally some huge functional void since someone has to implement classes to fill functionality gaps where there isn’t a reasonable mapping between libraries of the two languages and they never quite finish. This makes using the widget not quite as good as learning the output language, not to mention having to learn the widget’s libraries, which are supposed to mimic the output language’s libraries (and they often don’t). Then, there are bugs. Lots and lots of bugs to terrify you and give you nightmares. Why not just spend a few days learning the language you need to use? Your engineering skills will get you through it.
My wife wanted my iPhone 3G so I couldn’t hold off on upgrading until next year so I trotted down to the Apple store at 5:30 AM to wait in line this past Friday. Lots of people have called the 3G S a marginal upgrade since there was no aesthetic change but it’s actually a significant upgrade. Although I wanted a new design, it makes sense to redesign every could of years instead of every year and I was glad to continue using my existing accessories.
iPhone 3G S got a storage bump. Thirty-two gigs of flash memory makes for a handy iPod with plenty of storage for my music (those with large music collections might find this cramped, but it’s double that of the old high end iPhone). Apple also added a significant processor upgrade (Anandtech has already gone in depth so I will not) and iPhone 3G S has 256MB of memory, up from 128MB in the original and iPhone 3G. These upgrades make for a “snappy” UI experience. It’s noticeable. The GPU was also upgraded, which will make for better looking games as soon as developers take advantage of it (that will not take long) and smoother frame rates with existing games. The phone comes preloaded with the iPhone 3.0 software (thoughts here) — it’s good. Although the phone supports 7.2 mbps HSPA, AT&T’s network doesn’t. They’re rolling it out, though, so hopefully it’ll help despite reports that show otherwise.
Apple threw in a 3.2 MP camera and added support for video recording. I was a bit miffed at video recording being a 3G S only feature as it could have been added to existing iPhones as well (via software, don’t give me that processor too slow crap..older candy bar phones record video fine). Apple also added speech reco via a voice command interpreter (dial, play music, etc.). This should also have been possible via software (again, candy bar phones). At the end of the day they needs to sell hardware so I understand the business reasons but I’m not a fan. Basically, Apple changed everything on the inside of the phone, added a bunch of software features, and called it the 3G S. If you have a first generation iPhone, this is a must-have upgrade. If you are on an iPhone 3G, it’s a toss-up but I’d spring for it.