Saturday, November 30, 2013

Javascript Performance Tips and more


Javascript performance tips

Designer tips for performance

Doug Crockford  the "Good Parts" Talks [1] [2]

javascriptjabber with scott hanselman , JSHint

Stack, Queue, Linked List using Javascript

Semextex GUI components

The jiggle effect using Javscsript

Javascript library trends

Javascript Fat arrow

JS implementation of excel like functionality

To Hell with JQuery

http://venturebeat.com/2013/11/08/the-future-of-web-apps-is-ready-isomorphic-javascript/

http://readwrite.com/2013/11/18/assessing-the-aftermath-of-the-html5-hype-cycle

http://blog.kevinchisholm.com/arrays-javascript/javascript-array-management-with-push-pop-shift-and-unshift/

http://coding.smashingmagazine.com/2013/11/21/introduction-to-full-stack-javascript/

http://www.dontfeartheinternet.com/

http://toddmotto.com/ultimate-guide-to-learning-angular-js-in-one-day/

http://coding.smashingmagazine.com/2013/10/29/get-up-running-grunt/

http://www.muleradio.net/thebigwebshow/102/

Some Good iOS7 resources


The site by Ralf Ebert has  some good basic introduction for iOS. Of course, I have to use chrome translate to read it in english.

cocoanetics - You can make any iOS device (>= iPhone 4S) and any Mac (>= late 2011) sporting a BTLE chip into an iBeacon.
An iBeacon is identified by 3 values: proximityUUID, Major and Minor. The first being a UUID and the two latter being two 16 bin integers. You can construct a CLBeaconRegion in 3 levels: only UUID, UUID plus Major, UUID plus Major plus Minor.
AutoLayout - rather than the master / details , gives the ablity to edit details inline

http://nshipster.com/ios7/

http://www.codersgrid.com/2013/10/04/ios7-code-sample-snippets-of-new-functions/

http://www.appcoda.com/uipageviewcontroller-tutorial-intro/

http://maniacdev.com/2013/11/top-ios-development-resources-for-week-ended-november-10th-2013

http://nathanbarry.com/app-design-handbook/#packages $39

http://mobile.smashingmagazine.com/2013/11/22/four-ways-to-build-a-mobile-app-part1-native-ios/

http://www.codelord.net/2013/10/18/adapting-scroll-views-to-ios-7/

http://coenraets.org/blog/2013/09/phonegap-and-cordova-with-ios-7/

http://www.raywenderlich.com/store/ios-apprentice

Saturday, November 23, 2013

Forkin and Pushin

working tree - your unstaged files
index - staged files
snapshot - in source control

git status -s

git log

 see hash of snapshot contents. each commit get new hash, usually can abbreviate hash using first 7 chars of the hash

git show <hash>

git gui

git log --pretty=raw or oneline

https://gist.github.com/ralfebert/515937

git checkout restores the files from the index

git diff 7char1...7char2 or git log -p

git tag labelname1 7char1 gives a tag to a commit

use a branch to create changes seperate from our main changes (i.e. master)

branch is a label to a commit - git branch -v

git branch newfeature creates a branch

switch between branches using git checkout <branchname>

if you are positioned on master you can do git merge newfeaure

gitk can be entered at command prompt

remotes is connection from one git repository to another

git remote -v shows connections

push your master to git hub (i.e. origin) : git push -u origin master

merging happens automatically when pulling from remote

In GitHub , What is a Fork
At some point you may find yourself wanting to contribute to someone else's project, or would like to use someone's project as the starting point for your own. This is known as "forking"
[more]

https://help.github.com/articles/using-pull-requests


Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.
There is the git-flow . See talk

Tuesday, November 19, 2013

Git up and go

Today I took in the Git Foundations training by Tim Bergland at the Witherspoon building (located at 2810 Cates Ave. on the  NCSU campus).  I can confirm if you park at 2815 Cates Ave, you might expect a parking violation warning on your windshield.

http://teach.github.com/presentations/git-foundations.html

On learning about why you have to invoke the add command twice on successive writes to the GIT repository.  why add twice??? three stage thinking (why u add everytime) :

working (tree)  --- edit   ->  
staging (i.e. status tells just YOU add/remove to empty shopping cart) ->
history (commit - together)

On the git log and how to create a git alias  (i.e. git lol)

provides date, author, 40 char commit id
C:\gittrain>git config --global alias.lol "log --graph --decorate --oneline --all"


Learned that branching is giving the "commit you are on" a label. You can only be on one branch at a time, and by default, you are on master 


C:\gittrain>git branch
* master

create a branch
C:\gittrain>git branch feature
\
Now on Branch feature
C:\gittrain>git lol
* 5390c82 (HEAD, master, feature) more books info
* 877cb2e Initial commit

Add file to branch staging
C:\gittrain>git add raven.txt.

Commit file
C:\gittrain>git commit -m "add brnch"
[master 82168b5] more barnch
 1 file changed, 3 insertions(+), 1 deletion(-)

switch to branch 'feature'
C:\gittrain>git checkout feature

Switched to branch 'master'
C:\gittrain>git checkout master

merge feature into master
C:\gittrain>git merge feature - m "merged"

delete feature branch (branch is just name for a commit)

C:\gittrain>git branch -d feature

The transcript of the class can be found here.
http://www.youtube.com/user/GitHubGuides
http://teach.github.com
http://teach.github.com/presentations/
https://github.com/github/teach.github.com
http://training.github.com/web/
http://training.github.com/web/free-classes/
https://github.com/githubteacher

Saw this link today on Git Hub evolution by Zach Holman . Also, a link on effective-git-branching-and-release-management

Friday, November 15, 2013

Javascript Tools Bower, Grunt, Yeoman

bower is a package manager for installing client-side libraries in your server-side environment . This post has a good introduction.
bower is a package manager for client side technologies. It can be used to search , install , uninstall web assets like JavaScript , HTML , and CSS. It is not an opinionated tool and leaves lot of choice to the developers. There are various tools built on top of bower like YeoMan and Grunt
C:\Users\dmbl>npm install -g bower
C:\Users\dmbl>bower

Bower : "offers the opportunity to search for packages you may need in your project (for example,bower search underscore to find Underscore.js) and install them in your project (for example, bower install –save underscore"

Grunt
command line build tool. It can help us automate repetitive tasks. We can think of it as JavaScript alternative to Make or Ant. It can perform tasks like minification, compilation , unit testing, linting, etc.
gruntjs-workflow : "Grunt.js is a fantastic task-based command line tool written in JavaScript on top of the wonderful Node.js platform. You can leverage Grunt.js to script away all of your grunt work"
grunt tasks : "Grunt JS is a task runner, which means it is designed to run tasks for you. It’s your little slave bot, and you can tell it what to do, and when to do it!"

Yeoman
As stated on their website, Yeoman 1.0 is more than just a tool. It's a workflow; a collection of tools and best practices working in harmony to make developing for the web even better
AKA Yo - introduction to yeoman yo


C:\Users\dmbl>npm install -g yo


Related posts:

Intro to Angular, Yeoman, and Chrome Apps (Revised)

Wednesday, November 13, 2013

Node.js under the hood

In ten years of java development, I have mainly been involved with stateless  "pull" technologies:
The term connectionless is also used to describe communication in which a connection is made and terminated for each message that is sent. IP is connectionless as well as stateless.

With Node.js, it is a platform that fills a particular need :

  • don’t want to use Node.js for CPU-intensive operations 
  • Node.js operates on a single-thread, using non-blocking I/O calls
  • capable of handling a huge number of simultaneous connections with high throughput, which equates to high scalability
The main idea of Node.js: use non-blocking, event-driven I/O to remain lightweight and efficient in the face of data-intensive real-time applications that run across distributed devices.
Now,  that last phrase, Non-Blocking I/O. You will never hear anywhere, from anyone, that Node.js is non-blocking.

Further details:
avoiding the need for OS threads by simply refusing to wait. Rather than making blocking IO calls, wherein the thread stalls waiting for the call to return, almost all IO calls in Node.js are asynchronous, wherein the thread continues without waiting for the call to return. In order to handle the returned data, code in Node.js passes callback functions to each asynchronous IO call. An event loop implemented within Node.js keeps track of these IO requests and calls the callback when the IO becomes available.
It uses event driven concurrency


five talks learn more nodejs

http://www.slideshare.net/royaldark/presentation-28147455

Sunday, November 10, 2013

So it begins, on to NodeJs

I have been hearing for NodeJs for over a year now and I haven't gotten around to learning it. To me, the little I know about it, the value to me is that you don't need a full blown app server to serve up for a pretty straight forward web page. The fact that the code is written in  java script is neither here nor there,  as I can easily learn a new language if that is what is required.  I have been saving this link for a while. The nodejs download page says:
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
Within 5 minutes, i am able to execute npm at the command line.
npm -h quick help on  <cmd>
npm -l display full usage info 

npm faq commonly asked questions
npm help  <term> search for help on  <term>
npm help npm   involved overview
C:\Users\dmbl>node
>

Now, that you have reached the node '>' prompt, you can execute any JavaScript code by entering your code in this command line mode. However, you don't have access to everything you do in a web page in command line mode.

More resources and info: