Cogitas Blog:
Musings on developing Android apps,
machine learning and misc tech stuff.

Pick of the week links for programmers

Filed under: programming — December 16, 2012

Things I wish I learned in engineering school – advice by Rick Cattell, who has worked at Xerox PARC and Sun Microsystems

Is the older generation getting tech-savvy? – interesting article from the BBC News website, with food for thought for hardware and software designers.

Data visualisation job board – a good place where to look if you’re after a job in data visualisation, particularly using D3

UC Berkeley Course Lectures: Analyzing Big Data With Twitter – a semester full of videos

The Guava libraries: Google’s Java core libraries for collections and other goodies – well worth having a look for Java developers, the library includes collections, caching, primitives support, concurrency libraries, common annotations, string processing and I/O

Which minimum version of Android to support?

Filed under: google android — December 15, 2012

I hate to say it but Android has a weakness. Up until last year, manufacturers were very slow at providing updates Over The Air and Google didn’t push on this. Apple got it right from the start but Google messed up with this…

This situation changed about 12 months ago, where a noticeable shift was observed but with most people locked into 2 years contract, there are still 50% of devices out there using Gingerbread, released 2 years ago (for latest stats, see http://developer.android.com/about/dashboards/index.html )

(more…)

Own a smartphone? Fill in this smartphone usability survey

Filed under: random — September 26, 2012

Feel frustrated about the way your smartphone works? A friend of mine has set up a smartphone usability survey. It’s short and sweet, only 6 questions; some of them are multiple choice, some of them are actually edit text boxes where you can share details of your experience, and the survey is open to all smartphone users, whether you use iOS, Android, BB, WP etc

How to know when your Android MapView has stopped scrolling?

Filed under: google android, programming — June 8, 2012

When a user flings a Map on Android, the MapView carries on scrolling after the user has lifted the finger from the screen. Unfortunately, there is no method or event listener to know when the map has stopped scrolling but with a simple custom MapView, you can work it out.

(more…)

Minesweeper game for Android – with a twist!

Filed under: google android, programming — June 5, 2012

As many people with a Windows computer in the 90s, I have spent several hours of my life playing minesweeper. Over the years, I have come up with variations of how I would like to play the game but done nothing about it… until a few days ago.

Over the week-end, I prototyped and coded a variation, based around bubbles rather than squares, and released it as a free game for Android yesterday.

Screenshot from Bubble Minesweeper

The game works on Android 2.2+, and is designed for both phones and tablets. It can be played in both portrait and landscape mode, though, on a phone, you will get the most of it in portrait mode. The screenshot above is in landscape mode on a tablet (Sony Tablet S).

Download Bubble Minesweeper for Android for free.

Fibonacci sequence in Common Lisp – the power of Lisp recursion

Filed under: programming — Tags: , — April 15, 2011

As I’m currently studying for a BSc in Mathematics with the Open University and I am trying to teach myself Common Lisp, I decided to try and create a function that outputs the Fibonacci nth element. Here it is, I think is a nice example to illustrate how recursion works in Lisp.
(defun fibonacci (n)
    (cond
        ((> n 1) (+ (fibonacci (- n 1)) (fibonacci (- n 2))))
        ((= n 1) 1)
        ((= n 0) 0)
        (T (print "invalid number"))))

Parsing XML in Android

Filed under: google android — Tags: , — March 17, 2011

With web services used everywhere, being able to parse XML is a necessary skill when developing Android apps. Here’s an example for you to modify for your own purposes.
(more…)

Power saving tips for Android and other smartphones

Filed under: google android — Tags: , , — March 16, 2011

Charging your smartphone every day is pretty much expect whether you have an iPhone or an Android phone, but how do you make sure your phone stays put for the whole day, particularly if it’s a long busy day away from home/the office?

Disable Wi-Fi: unless you know you want to use Wi-Fi, disable it. In Android, go to Settings –> Wireless & networks  –> Wi-Fi checkbox.

Airplane Mode: if you are travelling on a familiar journey and know you are going through zones of bad reception, or if you are in the basement of a building with no reception, or travelling on the underground for example, switch to airplane mode. For Android, press your power button for a few buttons until a menu pops up and choose Airplane Mode option.

Use Airplane Mode instead of Silent Mode: if you are in a meeting and don’t want to be disturbed but would still like your smartphone on to check the time or simply because the noise it makes when you switch it on and off is too awkward in front of the boss, switch to Airplane mode instead of silent mode.

Got any other easy power saving tips? Share in the comments :-)

Use a colors.xml file to create consistent Android layouts

Filed under: google android — Tags: , , — March 7, 2011

When defining a layout in Android using an xml file, the temptation is often to directly type in the colour, such as #000 for black. However, when developing a complex app, there is high risk of inconsistent colours throughout your app so the best way is to define a colour xml file, called colors.xml and saved in the values folder, and to refer to these colours, and these colours only, in your layout xml files. You may also define drawables that are colours in this file, for when you need a Drawable object of a certain colour, and not a Color object.
(more…)

Let down by technology… (humorous real conversation heard in shop)

Filed under: random — Tags: , , — March 5, 2011

Conversation heard yesterday between two men in their 50s. This took place in the office store Staples, in front of a couple of Android tablets (Samsung Galaxy and a cheap Archos one if I remember correctly).

Man1 “What are they?”

Man2 “They are like the iPad I think.”

Man1 “Oh yeah, that thing.”

Man2 “Yeah.”

Man1 “But what is it really?”

Man2 “Like a laptop without a keyboard.”

Man1 “How do you type emails without a keyboard?”

Man2 “I’m not sure…”

At this point, I thought I’d help them out.

Me “Yes, you are right, these are devices similar to the iPad. The screen is a touch screen so you can interact with it by touching the screen.”

Man1 “That’s nonsense, who would want that?”

Man2 “My niece has an iPad.”

Man1 “You’d think by now, they’d do something that can read your thoughts or something. A touch screen? What next? A laptop you can shake? That’s crap technology!”

« Newer PostsOlder Posts »