shayla.sawchenko.net

Using Anonymous functions to provide scope

03 December 2013 - Filed under javascript

As you begin to work more with JavaScript, you will inevitably come across 'oddities' when referencing variables; these issues are more than likely caused by scoping and or closure quirks. While scoping and closures are fundamental issues that have been discussed in great detail, there are some subtle nuances that are important to make note of.

Read more...

Understanding ScaleType

28 October 2013 - Filed under android

While attempting to correctly position an image into a container I came across the documentation for the android:scaleType attribute and realized just how similar some of the types were.

Read more...

How to indent code in Markdown (.md) files

15 September 2013 - Filed under jekyll

Seems simple, but it took me some digging to find this.

To indent code blocks in markdown files, simply add 4 blank spaces in front of the code block from within the list.

Read more...

Mobile Web (JavaScript) Performance - Y U So Slow?

12 September 2013 - Filed under javascript

Awhile ago I read an extremely detailed article on mobile web application performance that attempted to quantify some of the issues faced by deploying a web app instead of a native app; one of the main conclusions that came out of the article was:

"Javascript is too slow for mobile app use in 2013"

Not actually having to deal with mobile web applications I put this article out of mind; I was, however, very interested to see a recent rebuttal to the above article written by Brandon Paddock which looks into some the issues a little further, discussing exactly how and where JavaScript can effect mobile performance - discussing the issues regarding the time required to download app assets and the threading model mobile apps are subject to that effect perceived rendering performance etc...

Read more...

How to stop Soft keyboard from popping up automatically

05 September 2013 - Filed under android

Problem: The softkeyboard is automatically popping up when your activity or fragment is loaded.

When an input is given focus, the default behaviour is for the soft keyboard to pop up. In the example below, listFilterText is getting default focus (as it is the 'first' input in the layout) and forcing the soft keyboard to pop up.

Read more...