09 Dec 2011 Eclipse is a great tool that I have been using for mmm... wow (!!!) probably about 7 years now and the most amazing thing about it is of course all the plugins that can really extend the functionality of the basic editor and make it highly personalized. This is great, but some things should just be in a good IDE. Like built in SVN integration. Seriously, why do I need to install a plugin for something so basic? Netbeans is another great IDE, but I use it less as most my development environments come from dedicated Eclipse plugins and while it is possible to do the development in Netbeans it is not as convenient and straightforward and this is what we the pragmatic programmers usually prefer.
So one nice thing I got used to in Netbeans is how it colors the changes that I made in the editor if the file is under version control (e.g. SVN). After I used Netbeans for a while and got to like this feature, when I got back to Eclipse I kinda missed it. It's nice and convenient. Quite non obtrusive i.e. it doesn't get in your way - you may not even be noticing this if you don't know about it.
Anyways, turns out that it is quite easy to enable similar functionality for Eclipse, alas you have to have SVN plugin I suppose for the "diff" to work. Just follow the screenshot if you want to enable coloring of SVN changes in Eclipse similar to Netbeans.
Here's how it will look (you can change colors if you want)
11 Oct 2011 Very energizing and inspiring video about Qualcomm's Snapdragon processor with the Adreno GPU. Wide deployment of the SnapDragon processors (including in the new iPhone 4S) makes it so more attractive to develop for.
If you are a game developer watch the video and get inspired!
Click to view in the full post
28 Sep 2011 Today I noticed that users of the Android app started experiencing problem with posting to Facebook, getting the following error:
There was a problem generating the Feed story from the provided data There have already been a few threads on StackOverflow like this one for iOS and this one for Android.
It definitely like a problem Facebook created (once again – sigh)... I will try to update this entry with a resolution once there is one. Hopefully though Facebook developers will just fix this bug on their end as there are a lot of developers (including myself) who had their code working for months with no problems until today.
You can see the status of the bug and add yourself to the list here. Although the bug is open just for iOS, once fixed for iOS, it should be also fixed for Android.
If you happen to know how to fix this, please leave your response in the comments and I will update this entry so that others can fix this problem for their users in the meantime.
UPD: 6:45 EST - it seems that the problem has been resolved! Yey! Hopefully some users will realize that we (the developers) are not the ones to blame (most of the time) that Facebook integration suddenly stopped working. Hopefully the ones that realize this will stop giving bad ratings on App Store and Android Market because of that.
26 Sep 2011 So I just heard about the upcoming "contracts" concept for future versions of Microsoft products (the contracts will probably get propagated at least partially into virtually all Microsoft products like Windows Phone, XBox, Tablet OS versions etc). The general idea seems to be that various applications will be able to share data and communicate otherwise not really disclosing too much about their functionality.
It is exciting news yeah, but why does it so painfully reminds me of Android "intents" system? To me it is exactly the same. Although some sources say it has some ideas similar to what former Microsoft Chief Software Architect Ray Ozzie’s proposed as the “universal clipboard” concept — dating back to 2006. I still find it hard to see how this is different from Android's intents system. It would be interesting to watch who sues who over that if at all. The huge piles of patents Google and Microsoft have do not make much sense to go to war over this.
It is interesting though to see how one of the most important features/ideas of Android OS gets propagated into other operating systems.
04 May 2011 I am one of the lucky people who managed to snatch a ticket to Google I/O this year. The event was sold in a record time - 58 minutes. The servers crashed instantly during the registration process and it was quite nerv wrecking. In fact I could only register after 2 hours the registration started when the servers have finally came up using a link from the cache of my browser which included session ID, where my ticket was already saved for me just before the servers crashed.
Anyway, I just wanted to put the Google I/O live badge so here it is:
</p>
03 May 2011 I have recently started using TextMate. It's been some time I wanted to give it a try and understand why so many people rave about it but every time I needed to use it, I usually wanted to do something very simple and sometimes I just got overwhelmed by all the options and sometimes I just didn't want to invest а lot of time into figuring out how to "use" TextMate beyond the most basic stuff.
One of the options I missed and couldn't find an easy way to do was to go to the last edit. After some searching however I did find a plugin that does that. You can download the go to last edit plugin for TextMate plugin and once you install it, you will have the "go to last edit" awesomeness in your TextMate. Use the⌥⌘J combination to activate the plugin. It uses the "undo/redo" mechanism but this particular plugin solves some problems that some other apple scripts or other solutions that use undo/redo technique had.
Enjoy this plugin and enjoy TextMate, although I actually like my MacVim better for most of the stuff I wanted to use TextMate for :). And actually I find Netbeans to be very good for JS, I started using TextMate for JS, but now I almost exclusively use Netbeans. Share your thoughts, opinions and experience with TextMate plugins and with Mac editors in general in the comments.
27 Apr 2011 Just got an email from RIM with news and such and noticed the link to the OS center they run on their website to help developers choose which BB OS to target. After looking at the stats, I decided to make a comparison and see how the official stats from RIM differ from what I see within my applications.
Here's the distribution published by RIM (dated March 3-d) I am not sure what they compiled into the March 3-d, i.e. what the timestamp of March 3-d actually means. Was it based on OS tracked for March 3-d, was it for last month, week or such. I couldn't find that information.
And below is the distribution I have compiled from the data for the month of April 2011 (a month worth of data)
The breakdown by OS version is not identical but the picture is pretty much similar, except that my chart is much nicer I've got 6.1 devices (hmmm!) and the 5.0 OS section is a bit larger for my statistics than it is for the official statistics. But again, the official statistics are pretty much 2 month old now and actually since the rest of the sections pretty much coincide with the official statistics, I would assume that the number of OS 5.0 just got larger in these 2 month; which by itself is great news for BB developers. Hooray to that and I will try to keep up with statistics to see how the distribution shifts, maybe another post in couple month or when something interesting happens. Let me know in the comments if you'd like to see something like that in the future and whether it was useful for you.
04 Mar 2011 I do an OTA (over the air) distribution for BlackBerry. Some time ago, I wrote here how to [link id='206' text='setup the mime types for the OTA distribution on Amazon S3']. Luckily now, S3 has got a new and very useful web interface, as well as improved mime type detection. They still get the file types not exactly right, but close enough so that the OTA installation for BlackBerry works on "autodetect" settings just fine.
This is however not about S3, this is about detecting the proper OS version of the BlackBerry OS from the user agent of the browser using a few very simple regular expressions. The code is tailored to PHP, but you can easily adapt it to any language that supports Perl style regular expressions, or you can adapt the reg. expressions as well based on this simple idea:
$agent = //get user agent raw string
if (preg_match("/BlackBerry/i", $agent)) {
if (preg_match("/6\.0\../i", $agent)) {
$newRelease['os_folder'] = "6.0";
}
if (preg_match("/5\.0\../i", $agent)) {
$newRelease['os_folder'] = "5.0";
}
if (preg_match("/4\.7\../i", $agent)) {
$newRelease['os_folder'] = "4.7";
}
if (preg_match("/4\.6\../i", $agent)) {
$newRelease['os_folder'] = "4.6";
}
if (preg_match("/4\.5\../i", $agent)) {
$newRelease['os_folder'] = "4.5";
}
if (preg_match("/4\.3\../i", $agent)) {
$newRelease['os_folder'] = "4.3";
}
if (preg_match("/4\.2\.1/i", $agent)) {
$newRelease['os_folder'] = "4.2.1";
}
//Form your download URL here
} else {
//This is not BlackBerry user agent
}
Nothing complicated, but this should give a start point to any one tying to serve appropriate bundle via OTA.
If you were to use S3, then it would basically be:
// The main link to S3
$downloadURL = "https://s3.amazonaws.com/YOUR_BUCKET/releases/" . $newRelease['version_folder'] . "/" . $newRelease['os_folder'] . "/YourAppName.jad";
Post your thoughts/corrections in the comments!
26 Feb 2011 In some Java implementations/SDKs the Color class does not have the
int Color.argb(int, int, int, int)
method.
One SDK that, as far as I know, does not have this method is the [link id='75' text='BlackBerry SDK'].
This code snippet can be used to perform just that:
public final class ColorBB {
public static int argb(int A, int R, int G, int B){
byte[] colorByteArr = { (byte) A, (byte) R, (byte) G, (byte) B };
return byteArrToInt(colorByteArr);
}
public static final int byteArrToInt(byte[] colorByteArr) {
return (colorByteArr[0] << 24) + ((colorByteArr[1] & 0xFF) << 16) + ((colorByteArr[2] & 0xFF) << 8) + (colorByteArr[3] & 0xFF);
}
}
Let me know in the comments if you have any improvement/modification ideas.
09 Feb 2011 Great collection of design rules by Eric S. Raymond
Eric S. Raymond
- Rule of Modularity: Write simple parts connected by clean interfaces.
- Rule of Clarity: Clarity is better than cleverness.
- Rule of Composition: Design programs to be connected to other programs.
- Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
- Rule of Simplicity: Design for simplicity; add complexity only where you must.
- Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
- Rule of Transparency: Design for visibility to make inspection and debugging easier.
- Rule of Robustness: Robustness is the child of transparency and simplicity.
- Rule of Representation: Fold knowledge into data so program logic can be stupid and robust.
- Rule of Least Surprise: In interface design, always do the least surprising thing.
- Rule of Silence: When a program has nothing surprising to say, it should say nothing.
- Rule of Repair: When you must fail, fail noisily and as soon as possible.
- Rule of Economy: Programmer time is expensive; conserve it in preference to machine time.
- Rule of Generation: Avoid hand-hacking; write programs to write programs when you can.
- Rule of Optimization: Prototype before polishing. Get it working before you optimize it.
- Rule of Diversity: Distrust all claims for "one true way".
- Rule of Extensibility: Design for the future, because it will be here sooner than you think.