Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Border



  passing parameters to XMLHttpRequest’s onreadystatechange function

I’ve been smashing my head against this all day – but I finally got something working consistently and reliable, so I better damn well document it. This is as good a place as any, and hopefully it will be useful to others.I needed to make an Ajax call, so I turned to my good friend XMLHttpRequest. One wrinkle was that I needed to pass in a parameter to it… so I tried:var test = "bar"; req = new XMLHttpRequest(); req.open("GET", myURL, true); req.foo = test; req.onreadystatech...

   JavaScript,AJAX,XMLHttpRequest,parameter,onreadystatechange     2011-10-09 01:32:09

  Rails and Web Development - Take the First Step

Getting started with web development isn’t easy. Looking back to when I started, the first few weeks were the toughest to stick with it. For someone who is new to text editors and the terminal – the installation process can be really overwhelming. I recently went through the process of helping some of my friends get set up with Ruby on Rails and after doing it a few times, I realized it would be helpful to write a post that others looking to get started could refer to.The following...

   Web design,Rail,Ruby,Ruby on Rails     2011-10-17 11:16:51

  Share on Twitter link

Ever wanted to give your readers, or your client’s readers a chance to share the post quickly on Twitter?The code is straight forward:<a href=”http://twitter.com/home?status=Currently reading http://www.test.com/post-url” title=”Click to share this post on Twitter”>Share on Twitter</a>If you’re using WordPress and want to automate this, simply use the following to insert the link to the current post in the loop into your link:<a href=”ht...

   Twitter,Share button,Customize,Custom     2011-08-24 10:55:51

  A return to good code

Stop doing this:public boolean foo() { if (true) {   return true;   }  else {   return false;   }}It always amazes me when I dig into an open source project, and I see code written by supposed experts, and reviewed by seasoned professionals, and nobody slaps the wrists of the developer who shoves return statements right in the middle of a method.Tell me, how hard is it to do this:public boolean foo() {   boolean flag = true;  ...

   Java,Code,Method,Return,Condition     2011-03-23 01:24:47

  I've got an idea for an app

I’ve been an iPhone developer for over three years now. The first app I built was CookieCombo. We sold enough copies to go bowling twice, but still it was completely worth it. We tweeted about it, and got some awesome gigs out of that. Everybody was in need of iPhone developers, and there was a huge shortage. Good times.As more and more people got to know that I’m an iPhone developer, I got to hear the following phrase more often: “Hey, you know, I got a great idea for an app...

   Idea,App,Induction,Creativity,Innovation     2011-09-08 10:37:09

  How regular expression works

Rob Pike wrote 30 lines of codes to realize a simple regular expression matcher in his book The practice of Programming. This piece of code is really cool. Let's take a look at the code.Meaning of different characters.Character Meaning c General character . Match any single character ^ Match start of a string $ Match end of a string * Match zero or many occurrences of a character /*match :Test the regexp in text*/int match(char* regexp,char* text){    if(regexp[0] == '^')&n...

   Regular expression,Implementation,Rob Pike,C     2012-06-25 05:23:41

  How can I teach a bright person, with no programming experience, how to program?

I usually prescribe the same sequence for anyone who wants to learn programming. It's very theoretical, but it lays a good foundation. It should take three or four months of fulltime study, but programming isn't something you learn overnight.If you can't get through this sequence, you're not going to be able to program, so you might as well give up now.Code, by Charles Petzold.The C Programming Language, K&RThe Structure and Interpretation of Computer Programs, Abelson and Sussman.My rule is...

   Steps,Programming,No experience,No knowledge     2011-11-07 08:27:48

  Substitute of Right Click Computer to Open Manage

I believe some of us may encounter some strange problems when we expect something normal to happen when we operate on our computer. On Windows 7, we may sometimes want to manage our service or applications by opening service manager.But somehow we may find that we cannot open it by clicking on Start->Right click on Computer->Manage.It may prompt some error message to tell us we cannot open the service manager. Then what to do? Here is a way to open it,goto Start->Run,then type "com...

   Computer Management,Win 7,compmgmt.msc,S     2011-03-31 01:09:44

  People, processes and tools

Some years ago, one of my managers used to repeat this "Accenture truism" (or so he designated it): to fix or improve something, first you need the right people, then you need the right processes to help those people work together, then finally you need the right tools to support those processes. People, processes, and tools - in that order.This is even more true for tech startups than for corporations. As geeks, whenever we face a problem, we often start by looking for a tool to fix it. "Our te...

   Work,People,Process,Tool,Importance,Priority     2011-10-24 11:36:14

  How to maintain a software project?

For a software engineer, at least from my own experience, maintaining an existing software project would take up a considerable amount of time: adding new features, fixing tricky bugs, and so on. In this post, I will share some some tips about how to become a veteran from a novice quickly when facing a new project. (1) Get familiar with the background knowledge of the project. Every software has its own purposes and users: a device driver serves the specified hardware, whilst a SMS gateway helps...

       2017-08-05 02:20:46