Live DOM nodes

Maybe I am just naive, but I am used to jQuery’s static node, meaning the change in the DOM structure is not reflected automatically in a queried result.

It turns out some native methods are live or reactive. Three of them are:
document.getElementsByTagName()
document.getElementsByTagNameNS()
document.getElementsByClassName()

This means the following code is an infinite loop:

var divs = document.getElementsByTagName('div');
for(var i=0; i<divs.length; i++){
  document.body.appendChild(document.createElement('div'));
}
Advertisements
Standard

Pick an editor library

WYSIWYG choices:

Math:
http://www1.chapman.edu/~jipsen/mathml/asciimathsyntax.html

Text:
http://www.codersgrid.com/2013/09/04/medium-editor-ui-zenpen-grande-js-and-pen-editor/

4 medium.js forks:
http://jakiestfu.github.io/Medium.js/docs/
https://github.com/tholman/zenpen
https://github.com/mduvall/grande.js
https://github.com/sofish/pen
https://github.com/daviferreira/medium-editor (my favorite so far)

Very interesting implementations:
http://madebymany.github.io/sir-trevor-js/
https://news.ycombinator.com/item?id=6570042

StackOverflow:
http://meta.stackoverflow.com/tags/editor/info
https://code.google.com/p/pagedown/

The classic:
http://www.tinymce.com/
http://www.wymeditor.org/

The minority:
http://imperavi.com/redactor/
http://www.sceditor.com/

Standard

Git merge several repos

There are many ways to do it.

One way is:

– Clone old-repo1 to local machine

– Move everything to old-repo1/old-repo1

– Go to new directory

– Git remote add old-repo1 ../old-repo1

– Git pull old-repo1 master

 

There is always a hard step. I use the following script to move old files to its sub directory


for file in $(find . -maxdepth 1 -type d -not -name '.*'); do git mv $file $(echo $file | sed -e 's/^/sub_dir\//'); done

for file in $(find . -maxdepth 1 -type f); do git mv $file $(echo $file | sed -e 's/^/sub_dir\//'); done

Standard

Looks like the entire prelinked team is hired

Looks like all of our four team members from Prelinked are hired as of today. Yes!!!

Team matters a lot in Hack Reactor. For one, the project / tech stack is important. For another, your teammate will be your best ally in the interview process. We practiced interviews together, revised each other’s resume and passed down leads when one person has already taken a job offer. The best part is the mutual supporting. Without the team, the job hunting process would be a much harder one.

Standard

The only time I got it right

I have been practicing predicating start-ups  for a while and I tend to be horribly wrong. But I think I might be getting better and better over time. Two companies I liked a lot both raised a significant amount of money recently.

One is Memoto, which changes its name to Narrative. You can visit them here: http://getnarrative.com/. They raised $3M in a round led by San Francisco-based True Ventures.

The other is Loom, which recently raised $1.4M seed. http://techcrunch.com/2013/10/04/icloud-alternative-loom-raises-1-4-million-seed-round/

Awesome…

Next on my list:

– Cotap.com. If they pivoted well, they have the opportunity to become the next Yammer.

Standard

scrum?

Now I know why employers are impressed when we talked about daily stand-up, 2 days sprints and weekly releases, because that is highly relevant to the workplace.

I wanted to share some of the scrum notes, since most of them are in the public domain anyway.

What is scrum:

– A subset / branded version of agile. Agile is the opposite of waterfall. Waterfall is borrowed from classic engineering, i.e. building a bridge requires a huge amount of planing prior to construction.

Who:

– Product owner

– Dev team

– Scrum master

What do they do:

– Product owner creates user stories and he is responsible for the ultimate success of the product.

– Dev team.

– Scrum master has no managerial authorities. He is a facilitator to remove the road blocks for the dev team.

Process:

– Prioritized backlogs, with each backlog representing a user story.

– Backlog review meeting. Can be informal.

– Sprint planning. One week duration for now, preferably with several user stories per sprint.

– Daily stand-ups. Answer three questions: what did you do yesterday, what are you going to do today, are there blockers?

– End of sprint with one sprint review and one retrospective review. Sprint review should demonstrate each finished user story. Retrospective review is where everyone provides feedbacks regarding systems and processes.

User stories:

– Make sure all engineering efforts are impacting users.

Standard