Wednesday, April 18, 2012

What every software engineer have to know

Being innovative and creative is a big advantage in a software world. Being ignorant is a curse. The basic principle is "you will never implement something what is already implemented unless...".

  1. Current implementation isn't enough and can't be easily adjusted to your needs.
  2. Current implementation is totally crap and you need implement it from scratch.
  3. You have a lot of time or money and can do it better (don't even dream about time).
  4. You can really make it better.
Anyway, to identify any of those there is one big prerequirement: you have to know about existing solutions: designs, architectures and libraries!

Sunday, April 15, 2012

Singleton in JavaScript with Google Closure library and compiler

I'm writing a small WebApp. I want to a create singleton. Probably there is a dozen different way to implement it in JavaScript. As I became a fan of Google technologies I will show two solutions how it can be easily implemented using Google Closure.

Thursday, February 9, 2012

vim notes

Replace bracket indexing by member indexing.
:%s/variable\['\(\w\+\)'\]/variable.\1/gc
And more general:
:%s/\['\(\w\+\)'\]/.\1/gc
Change: "smth1 = smth2; " to "smth2: 'smth1',". :%s/\W*\(.*\) = \(.*\);/ \2: '\1',/gc

Friday, December 30, 2011

Screenshot with Android powered device

As I own beautiful Samsung Galaxy Nexus, I'm sometimes willing to make some screenshot to blog, show a friend or send bug report to developers etc.
Galaxy Nexus has Android 4.0 (Ice Cream Sandwich) on board so I don't know how it is in older versions.

To make a sreenshot: hold Volume Down + Power buttons by about 2 seconds. After than the information about the screenshot should appear on your device.

Below is the screenshot of this post.

Tuesday, December 20, 2011

Page Speed

Page Speed is an open-source project started at Google to help developers optimize their web pages by applying web performance best practices. Page Speed started as an open-source browser extension, and is now deployed in third-party products such as Webpagetest.org, Show Slow and Google Webmaster Tools.
So if you want to try Page Speed go: http://code.google.com/intl/pl/speed/page-speed/