Posts

Showing posts from July, 2013

Useful CSS Wisdom

I came across this in the most recent Web Design Weekly. I have called it wisdom as it is full of the type of advice that people only have the balls to give you when they really know what they are talking about. Why IDs in CSS should be avoided is detailed. A lot of people rant about this, but there is something about this document that got me sifting through my CSS to find all the # marks. The document is short and I am going to look back at it a few times over the coming months to make sure I have squeezed the benefit out of it.

Web Design Weekly

Web Design Weekly is a great resource for front end developers and wannabes. Once you subscribe it arrives in your inbox once a week with a selection of articles, news, tools etc. that you can use in your work. It is just like subscribing to RSS but I find that getting news on a specific area like this once a week means that I set aside some time to at least browse it and find out what is interesting. The material is often of a high quality and where I don't manage to get stuff working it's probably down to me not persisting with it long enough. If this is the type of work that you do I recommend signing up for this. The link is at the start of this post.

Mozilla Developer Network JavaScript Resources

When I am looking for anything to do with js, html or css on the web I tend to put the letters mdn into the search line along with whatever else I am looking for. This usually pushes me to the pages on the Mozilla Developer Network. They are consistently of high quality - unlike for example W3Schools  and are clearly written by the type of people who possess the knowledge that I want. Mostly it is just a dip in to find our a syntax here and there, but they do offer comprehensive book style start to finish information. The JavaScript Guide for example is here . I have been programming in JavaScript for quite a while now, so I am not reading this line for line, but a scan through it is clearing up some long held confusions for me. I reckon getting proper skills into your head and hands is a slow process and the way there is to persist and add new pieces every day. Going through the MDN docs is an example of this.

Book about Design Patterns in JavaScript

This book by Addy Osmani goes into depth about the various design patterns that you can use in your JavaScript. The main advantage that I am getting out of it is going through the examples and reading the references to see how to do 'complex' JavaScript. Singletons always come in handy in Java, now I can do them in JS. A host of other patterns are covered. I will be taking the time to go through this book in more detail over the coming weeks.

Some Resources to Help You Get Started With Grunt.js

I have been a bit worried about deploying cleartext javascript to my production environment for a while now. The hassle of obfuscating always put me off: Use something like Google's closure service Change all of the references in my html to point to the generated files Make sure the clear text dev versions of the js are not deployed and finally  Do the deploy Grunt.js looks like it might be my saviour here. Having come from (and still being in) the Java world I think of this as being Ant for javascript. Just what I was after. I am just doing a bit each day so as not to interfere too much with the day job, but so far I have added these tasks (in development at least, I am not doing anything with grunt on live code yet): Remove white space from js files with uglify Compress javascript to gzip Run my existing QUnit tests Lint my javascript Although it is early days this looks like having the scope to make everything a bit easier. Here are some resources I have used o

Feature removal from mysql following Oracle takeover?

I am using MySql 5.5.20 (select @@version). There does not appear to be any difference between explain and explain extended in this version. See here for the expected output from extended. I don't know if this is a feature removal that happened after Oracle took over. They seem to be pushing people to buy the enterprise tools. Not an option for some (me included) as I am using Google's Cloud SQL service. I don't think it allows this type of monitoring and even if it did it is unlikely that I have access to the knobs to turn to make good on its recommendations. My experience of enterprise monitoring is limited as I mainly do dev, not admin. I am usually not around when the dust settles and people start to worry about stuff like monitoring. I was at a mysql talk given my Oracle last year in Dublin. It was an impressive morning spent explaining the things they had improved in mysql since the purchase. They did not mention removing any handy admin features which might pus

Falling off a performance cliff with group_concat in Google Cloud SQL

I started to write this article as the performance of some of my mysql queries had gone off a cliff. This was related to my use of the GROUP_CONCAT function. This rolls up a set result set and shows the passed in row values concatenated. Handy for reporting, but not much else. In the highly memory constrained world of Google Cloud SQL using this on a well indexed set of tables (albeit it with multiple left outer joins in place) pushed a regularly executed query for a few hundred milliseconds to 6 to 9 seconds. Disaster. I pulled the db over to my dev machine (copy of prod) and ran the query there. No problem. I am concluding that the GROUP_CONCAT was the bad guy here. I found another way to achieve my goal, but this cost me an afternoon and a lot of fretting before I got out of the woods. MySql is not bad, but occasionally it bites.

Good Video on Creating Large JavaScript applications

My JavaScript application started out small, but is now getting very big. The main js file is about 3k lines long. Performance is still very good, but I am getting concerned about maintainability. I had been stumbling around in the alphabet soup of javascript tools and libraries for a while and was looking for somethign which would make sense of this. I found Addy Osmani's video on structuring large JavaScript applications very good. I have just watched the first part (23 mins) so far, but it is pitched at my level, so looking forward to the next ones. The video is here: http://addyosmani.com/scalable-javascript-videos/ Addy's slides are here: https://speakerdeck.com/addyosmani/large-scale-javascript-application-architecture He mentions at one point that he is writing a book on backbone.js development. Here is a link to the book https://github.com/addyosmani/backbone-fundamentals Its free at this link, but you have to build. I will give this a go at some point. You ca

Good Design Learning Resource

I signed up for HackDesign about a week ago and they sent me an email with some links in. It took a bit of time to get through it all, but it was worth it. I am always learning new bits of stuff - CSS, Java, SQL you name it, but am rarely satisfied that I am following the right 'path'. Not being thorough enough. Resources like HackDesign are the solution to this I reckon. Nice and deep view of a subject - design in this case. There is enough scope for you to click plenty of links and generally learn by doing something other than just reading. These Yahoo design patterns for the web were a useful find. I found them through one of the links in one of the articles. And this is only week one. Now to find similarly deep resources on the other things that I am learning.

Structure in Android App Design - Google IO Video notes

If you are an Android developer, this is well worth a watch. It is from this year's Google IO. Below are some of my notes from watching it. Importantly it introduces the Navigation Drawer (to me at least). I had seen this in a lot of places (Irish Times app for example) and liked the look of it, but was worried about having to pick a library to rely on for this functionality. So the Nav Drawer is now in the support library which makes it usable in most apps.  I'll be taking a look at PhysioTrack over the next few weeks to see how I can enhance its structure by using some of the learnings from this talk.  My Notes: This is an example of a use case that was used in the talk Find a Bar Primary Actor: Drinker Precondition: BarKeeper installed Primary Scenario: 1 Users launches app 2 Indicates that they want to find a bar 3 App presents a list of choices 4 User selects a bar and is shown the choices Steps to take to produce your use cases: Take