April 18, 2013

How to master git rebase like a boss!

once your work on the forked project is done, then is the time to get everything back to the upstream.

$ git fetch upstream; git checkout master; git rebase upstream/master

if everything is ok this will go through hands-down. if there are merge conflicts you will be prompted, then

$ git rebase --continue; git rebase --skip; git mergetool

also every once in a while execute the following command to get rid of the .orig files that would appear after a merge

    $ find . -name "*.orig" -print0 | xargs -0 rm

note: You can use kdiff3 as your merge tool.

 More on Git

March 29, 2013

Java and Closures

I found that java is in the process of adding function closures (function as first class citizen) to its syntax.

Here is a good example

March 25, 2013

How to check Scala/Java in real Bytecode?

Imagine you have the following code in  AntiTailRecursive.scala

object bc {

  def factorial(n: BigInt): BigInt = {
    if (n == 0)
      1
    else {
      //n*factorial(n-1)
      val t1 = n - 1
      val t2 = factorial(t1)
      n * t2
    }
  }

  def main(args: Array[String]): Unit = {
    println(factorial(5))

  }
}

$ scalac AntiTailRecursive.scala  #compile the code
$ scala b # verify that the code works
$ javap -l -p -c -v b     #To view the java byte code of this scala source code/class:

March 24, 2013

Alternative Way to Master Ubuntu

Recently I found some new tools that make you a master using linux specially ubuntu.

Try Krusader which is a file manager instead of Nautilus. Nautilus is cool but doesn't give you the feelign fo a good file manager.
Krudsader benefits:
tools to compare files,
open terminal here,

March 6, 2013

Peer-to-Peer Command-Line Chat in Go Lang

I just implemented a peer to peer (p2p) command-line chat in Go language version as an example to start with. I start to like Go!

You can view the source code here on Github: https://github.com/mshahriarinia/Golang/blob/master/p2pChat/src/node.go

Some notes :

1. Spent quite some time on finding and setting up debuggers

January 20, 2013

Annoying \r\n Bug

That awkward moment when you realize isn't doing something right, you check online realizing that it is a bug and there is a new update adderssing that specific issue as the first most important change!

notepad++ did not recognize \r\n in regular expression mode and that was annoying!

notepad++ from version npp.5.8.5 to version npp.6.2.3 fixes the bug:
Notepad++ v6.2.3 new features and fixed bugs:  

December 24, 2012

Which Web Application Framework is Best w/ statistics

Ok, I am trying to see what's hot among web application frameworks these days. And here is the statistics:

craigslist postings gives an overall estimate of programming languages, web application frameworks right on demand. So here are the results:

December 22, 2012

What/Which Web App Framework? Technology Stack Example?


from Quora:

What are the programming languages and frameworks the top NYC startups are using?



In a conversation with the NYCEDC and ITAC, I learned that no one has a sense of what are the predominant languages and frameworks that people are using.

If you are with a startup or company that has more than 1M pageviews a month and is based in NYC (or the boroughs), can you give a sense of the skills/experience you are looking for? This will help people understand what skills we need to grow….

Companies like:

  • Tumblr
  • OMGPOP
  • Kickstarter
  • Makerbot
  • AppNexus
  • Aviary
  • the Fridge
  • ideeli
  • Daylife
  • HowAboutWe
  • Thrillist
  • Gawker
  • Artsy
  • Sailthru
  • 20x200
  • fanfeedr
  • SolveMedia
  • Social Flow
  • HuffingtonPost
  • AppFund
  • betaworks
  • Work Market
  • Chartbeat
  • Producteev
  • Voxy
  • Food52
  • infokent
  • forumidea






Jason Pearlman, CTO @ OMGPOP

Here at OMGPOP:

Language - Ruby, AS3, Erlang, C/C++/Objective C, Javascript
XMPP - ejabberd, openfire
Web Frameworks: Rack, Merb, Sinatra, Express
Database - MySQL, Redis, Memcache, Vertica
App Server - Thin, node.js
Proxy Layer - Nginx + HAProxy
Hosting - Amazon EC2 / Softlayer / Managed Colo
Queuing - Redis/Resque
JS Library - jQuery / underscore
Monitoring - New Relic, Nagios, Munin, Flume, Custom
Testing - rspec, selenium
Etc - jira, git, svn, puppet, capistrano
  


Languages:

Programming Language for a Startup w/ statistics

Yes, it is the programmer more than the language that makes the difference, but there are a few basics:
1) Choose a popular language so you can easily find programmers.
2) Object oriented is best.
3) Structured is best.
4) Probably the simplest way to identify good code (and a good language) is to read some. The more straight forward it seems, the better it is. (Easy to understand = hard to hide bugs)
5) Evolve instead of Develop your code. (Build simple apps for fast feedback, change/add code to improve it.)
6) Whatever you have written will be wrong. Plan for change. Expect to undo.
7) Write the code in two orders

December 17, 2012

Unrewarded Genius

"Nothing in the world can replace persistence. Talent will not; nothing is more common in this world than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent."



http://www.aquarius-atlanta.com/articles/?issue=12-2010&i=1274&article=james_allen_an_unrewarded_genius

December 11, 2012

Is following roboto.txt illegal? How about nofollow links?


http://www.robotstxt.org/faq/legal.html

Can a /robots.txt be used in a court of law?

There is no law stating that /robots.txt must be obeyed, nor does it constitute a binding contract between site owner and user, but having a /robots.txt can be relevant in legal cases.
Obviously, IANAL, and if you need legal advice, obtain professional services from a qualified lawyer.
Some high-profile cases involving /robots.txt:

On Florida and Startups

Content from Quora.com

Florida startups: What are some of the specific challenges you have running a startup in Florida and what would keep you here?


Juan Bermudez, Minister of Tech @ NightPro.co

I think finding mentors and/or advisors is harder down here, we are pretty spread out in south florida and the volume isn't huge yet. So finding the right person, with experience in your industry seems more dificult than in other obvious cities.

We work from a home aparment at the moment, but