Sunday, December 16, 2012

Rambling Mumbling 4

I cannot remember listening to the Emperor Concerto before I watched The Assassination of Richard Nixon. And even then I did not know it was Ludwig Van's; yet, it had a spell on me. Now, while creating lists of favorites from Bach, Mozart, and Ludwig Van; I chanced upon Emperor, I recognized it; I had a feeling of meeting a long-unseen, beloved friend and right away it took a special place in my mind, a place shared only by Bach's air.

Rambling Mumbling 3

On my iPhone, I have Merriam-Webster and Dictionary from Farlex Inc.; both are free apps. I like Merriam-Webster better, because the word-explanation is less cluttered. Rarely I fail to find a word in Merriam-Webster and I need to look it up in Dictionary. I wish I could touch the word on the book-page and see its principal meaning there without needing to pick up and unlock the phone and then search in an app. Yet I would never want to miss the ink-on-paper feeling, the feeling of turning a page with my fingers, the pleasant feeling of weight and girth, the smell on the page, its aging; those vary from book to book, and are still missing in the e-readers.

Saturday, December 1, 2012

Rambling Mumbling 2

If you get attached to an opinion too much, you could get hurt. For example, I grouped the important scientific papers on usable authentication into several categories. Then I sorted them chronologically in each category. I thought I would read one category at a time and in chronological order, so that I could specialize on a particular concept (general to that category) while getting to know the temporal order of the developments in that category. But it seems that not all papers require the same level of concentration and quiet. You could become tired and less attentive and it is better to switch to easy papers in a different category for a while, may be until you are having sleep. After you have woken and your mind is fresh again, take up the difficult papers you skipped before.

Friday, November 30, 2012

Words

Monday, November 26, 2012

Rambling Mumbling

I am awake for twenty hours now, without any pressing reason. For the last couple of days, I had been studying at night and sleeping by day. I discovered that night is quieter than day, so much so that the daybreak makes it very hard for me to concentrate. I am studying research articles on usable authentication. In the beginning it took between two and four hours to read one research paper and I could not finish reading more than two papers between sleeps and the sleeps were lengthy. I thought this would continue and I would not be able to read more than a small fraction of the important papers in the field. Couple of days later I found out that the related works section of the papers were mostly known to me and that there was a pattern in which they organized the papers. Even the experiments, user study, hypothesis test, and security analysis seemed to reveal some patterns. I found majority of the words in the papers do not bring any news to me. I could glean a lot of information only by looking at the pictures, graphs, and tables and just by musing about them by myself. As a result, I can read most papers rather quickly now.

Thursday, November 22, 2012

Effective Advices

  • While solving a problem, concentrate and work vigorously on it. If stuck, leave it for now. Start working on some other problem. Hopefully the subconscious will succeed in finding a crucial connection or two in the already existing data on your brain and you will experience a eureka  moment. [Poincare]
  • The best idea is to have lots of them. [Pauling]
  • Never write out all the ideas before going to sleep. Save one or two, so that you have something handy to start with, tomorrow. [Hemingway]
  • One moral of this story is that you should always collect more materials than you will use. Every article is strong in proportion to the surplus of details from which you can choose the few that will serve you best - if you don't go on gathering facts forever. At some point you must stop researching and start writing. [Zinsser]
  • The Seven Habits of Highly Effective Mediocre People by Altucher

Tuesday, November 20, 2012

Ernest Hemingway on Writing

  • When I was writing, it was necessary for me to read after I had written. If you kept thinking about it, you would lose the thing that you were writing before you could go on with it the next day. It was necessary to get exercise, to be tired in the body, and it was very good to make love with whom you loved. That was better than anything. But afterwards, when you were empty, it was necessary to read in order not to think or worry about your work until you could do it again. I had learned already never to empty the well of my writing, but always to stop when there was still something there in the deep part of the well, and let it refill at night from the spring that fed it. [A Moveable Feast, pp. 25-26]
  • It was in that room that I learned not to think about anything that I was writing from the time I stopped writing until I started again next day. That way my subconscious would be working on it and at the same time I would be listening to other people and noticing everything, I hoped; learning, I hoped; and I would read so that I would not think about my work and make myself impotent to dot it. Going down the stairs when I had worked well, and that needed luck as well as discipline, was a wonderful feeling and I was free then to walk anywhere in Paris. [A Moveable Feast, p. 13]
  • Let me know how long I have to stay away from it before I can get it to you. Longer I can stay away before I have to get it to you the better it will be as gives me a whole new chance to see it cold and plug any gaps and amplify where there is any need. [to Charles Scribner, 1949, Selected Letters, p. 684]
  • P.P.S. Don't you drink? I notice you speak slightly of the bottle. I have drunk since I was fifteen and few things have given me more pleasure. When you work hard all day with your head and know you must work again the next day what else can change your ideas and make them run on a different plane like whiskey? [to Ivan Kashkin, 1935, Selected Letters, p. 420]
  • Writers should work alone. They should see each other only after their work is done, and not too often then. Otherwise they become like writers in New York. All angleworms in a bottle, trying to derive knowledge and nourishment from their own contact and from the bottle. Sometimes the bottle is shaped art, sometimes economics, sometimes economic-religion. But once they are in the bottle they stay there. They are lonesome outside of the bottle. They do not want to be lonesome. They are afraid to be alone in their beliefs. [Green Hills of Africa, pp. 21-22]
  • All art is only done by the individual. The individual is all you ever have and all schools only serve to classify their members as failures. [Death by the Afternoon, pp. 99-100]
  • I do not wish to squawk about being hit financially any more than I would squawk about being hit physically. I need money, badly, but not badly enough to do one dishonorable, shady, borderline, or "fast" thing to get it. I hope this is quite clear. [to Alfred Rice, 1948, Selected Letters, p. 655] 
  • I get letters from Vanity Fair, Cosmopolitan etc. asking me for stories, articles, and serials, but am publishing nothing for six months or a year ... because I know that now is a very crucial time and that it is much more important for me to write in tranquility, trying to write as well as I can, with no eye on any market, nor any thought of what the stuff will bring, or even if it can ever be published - than to fall into the money making trap which handles American writers like the corn-husking machine handles my noted relative's thumb... [to Grace Hall Hemingway, 1927, Selected Letters, p. 244]
  • I still need some more healthy rest in order to work at my best. My health is the main capital I have and I want to administer it intelligently. [to Wallace Meyer, 1952, Selected Letters, p. 752]

Sunday, November 18, 2012

Writings, I devoured

There are only a few books which seemed to resonate with me and I read with great appetite.
  1. Sherlock Holmes by Doyle: LOVE it
  2. The Double Helix by Watson: Thanks to my brother, from whom like many other beautiful things, I got this one. 
  3. Metamorphosis by Kafka: Read it in notepad format from gutenberg.org and with feverish speed
  4. Einstein's Cosmos by Kaku (Einstein is my hero since ummm... Kaku's account made me feel like I am walking side-by-side with him, sitting by the next chair, watching him, listening to him)
  5. Writings of Russell in general: I just love the way he writes.

Monday, November 5, 2012

Algorithm Sources

  • Here is a set of three short video lectures from Coursera covering the analysis of quicksort.
  • Linear-time Sorting: Here is a video lecture from ocw mit on Counting sort and Radix sort. 
  • This, this, this, and this: sources for Morris traversal, an inorder traversal of a binary search tree without using recursion or stack.
  • Red-black tree: Here is an applet to play with red-black trees. Here is a video lecture on red-black trees from mit opencourseware.
  • Here is a video lecture on Dynamic Order Statistics from ocw mit.
  • Dynamic Programming: Longest common subsequence, Rod-cutting
  • List of algorithms: Depth-first search, Breadth-first search, Topological sort, Kosaraju-Sharir, Kruskal, Prim, Dijkistra, Bellman-Ford, Ford-Fulkerson, LSD radix sort, MSD radix sort, 3-way radix quicksort, Multiway tries, Ternary search tries, Knuth-Morris-Pratt, Boyer-Moore, Rabin-Karp, Regular expression matching, Run-length coding, Huffman coding, LZW compression, and the Burrows-Wheeler transform

Wednesday, October 3, 2012

Java

  1. import static java.lang.Math.max; lets use max(2, 7) in place of Math.max(2, 7);
  2. A derived class does not inherit private methods of the base class.
  3. An overridden method must match the signature (+ return type) of its base class counterpart, except that it can have covariant return type. In the overridden method more permissive access modifier can be used, e.g., private -> public not the other way around.
  4. A final method cannot be overridden and a final class cannot be subclassed.
  5. Most to least restriction: private, default (inside same package), protected (same package + subclass), and public. 
  6. (a instanceof B) returns true even if a's class is a subclass of B. So, if we wish to check if a's class is exactly equal to B, we need getClass() method.
  7. Define catch blocks starting with most specific and ending with most general, e.g., NegativeNumberException should come before Exception, if not, NegatveNumberException never gets caught.
  8. try[-throws]-catch-finally: if no matching catch is there the method ends there, so codes after catch blocks do not get executed. However, finally ensures, even in this case the codes inside it get executed.
  9. ObjectInputStream and ObjectOutputStream let readObject and writeObject from and to file, if object is serializable. In order for a class to become serializable, all its class-type instance variables must be serializable as well.
  10. RandomAccessFile lets access bytes in the file at random.
  11. An abstract class can implement an interface, in that case not all methods mentioned in the interface have to be defined in the abstract class. An interface can extend another interface. All fields in an interface are public, static, and final; usually they are the useful constants. 

Monday, October 1, 2012

Javadoc

A comment must:
1. immediately precede a public item
2. start with /** and end with */
Tags are:
@param name description
@return description
@throws type explanation
@deprecated
@see package_name.class_name
@author name
@version info
usage: javadoc [options] package_name
Options are:
-link link_to_other_docs (may be url to java doc)
-d documentation_directory (where to put after generation)
-author (extracts author info from comments)
-version
-classpath list_of_directories (overrides CLASSPATH)
-private (extracts even the privates, not good)

Tuesday, September 25, 2012

Now and Then...

  1. Pseudocode is a programming language that never complains about syntax errors.
  2. As long as you are rigorous and precise, you can be as sloppy as you want.
  3. Quintus: "People should know when they are conquered." Maximus: "Would you, Quintus? Would I?"
  4. Do not mistake the pointing finger for the moon.
  5. Say what you mean, mean what you say.
  6. Gregory (Scotland Yard detective): "Is there any other point to which you would wish to draw my attention?" Holmes: "To the curious incident of the dog in the night-time." Gregory: "The dog did nothing in the night-time." Holmes: "That was the curious incident."
  7. EXERCISES 4. [HM45] Prove that when n is an integer, n > 2, the equation x^n + y^n = z^n has no solution in positive integers x, y, z.
  8. A poet once said, "The whole universe is in a glass of wine." We will probably never know in what sense he meant that, for poets do not write to be understood. But it is true that if we look at a glass of wine closely enough we see the entire universe. There are the things of physics: the twisting liquid which evaporates depending on the wind and weather, the reflections in the glass, and our imagination adds the atoms. The glass is a distillation of the earth's rocks, and in its composition we see the secrets of the universe's age, and the evolution of stars. What strange array of chemicals are in the wine? How did they come to be? There are the ferments, the enzymes, the substrates, and the products. There in wine is found the great generalization: all life is fermentation. Nobody can discover the chemistry of wine without discovering, as did Louis Pasteur, the cause of much disease. How vivid is the claret, pressing its existence into the consciousness that watches it! If our small minds, for some convenience, divide this glass of wine, this universe, into parts—physics, biology, geology, astronomy, psychology, and so on—remember that nature does not know it! So let us put it all back together, not forgetting ultimately what it is for. Let it give us one more final pleasure: drink it and forget it all!
     

Friday, September 21, 2012

A Microsoft Life

A collection of annecdotes from his fifteen years with Microsoft: first in technical support, then in security response, and finally with xbox team. Humors do exist in the book. Do not expect glimpses into a coder's mind, but you will find a human being living his life.

Saturday, September 15, 2012

Why 2's Complement

Say we have 3 bits to represent integers. We have 8 possible numbers.
000
001
010
011
100
101
110
111
We wish to use one of these eight numbers to represent 0, half to represent positive and half to represent negatives. But with eight of them, we cannot do justice both to positives and to negatives! Well we wish to represent 2 and -2 in such a way that 2+(-2) becomes zero even in our new representation.
Let us use 000 to represent 0. Say now we use 001 to represent 1. Then what could be a reasonable representation of -1 so that 1+(-1) = 0. In other words,
  001
+ xxx
-----
  000
Obviously xxx = 110, just flip the bits in 001. That almost worked, but what then does 111 mean? It must be the flipped version of 000 meaning 111 = -0, which is not good - we don't want negative zero. However, if we add 1 to 111, it becomes 000, the extra one falls off the left end because we just have 3 bits in our system. Ok. Then say our algorithm for representing negative number is as follows:
flip the bits in the positive number and then add 1 to the result of flipping.
Let's see what we get.
000 ---flip---> 111 + 1 = 000 (great! there is no negative 0)
001 ---flip---> 110 + 1 = 111 (= -1)
010 ---flip---> 101 + 1 = 110 (= -2)
011 ---flip---> 100 + 1 = 101 (= -3)
100 ---flip---> 011 + 1 = 100 (= -4)
So, we have got what we wanted, almost! And notice that all negative numbers have their left most bit set to 1. So, it is quite easy to recognize them in this representation. Say if the computer sees 110, it immediately knows 110 is a negative number as its left most bit is 1. Now to find out the magnitude of 110, all the computer needs to do is to apply the same two steps again:
110 ---flip---> 001 + 1 = 010 = 2. That means 110 = -2!
In this way we got one number as 0, four to be negatives and three to be positives and we can do subtraction using adding unit.
This flip and then add 1 is just 2's complement.

Wednesday, September 12, 2012

Multiple password prompt issue with Tortoise SVN

What we need to do is
  1. To generate a public-key/private-key pair on the SVN server.
  2. Add the public key to the server's list of authorized keys.
  3. Save the private key into a file on my computer.
  4. Use PuTTy-gen to make this private-key PuTTy compatible.
  5. Add this PuTTy-compatible private key to Pageant.
From now on, Tortoise SVN will use the key from Pageant's list of keys. As the corresponding public key is in the server's list of authorized keys, the client-resident-tortoise's signature can be verified by the server and thus I do not need to enter password again and again.

The procedure is as follows:
  1. Download PuTTy, PuTTy-gen, and Pageant.
  2. Log in to SVN server.
  3. Type "ssh-keygen -b 1024 -t dsa -f mykey"
  4. You will be asked to enter a pass-phrase for the key-pair. Do not forget it. You need it while making it PuTTy-compatible on your machine.
  5. If you type "ls" you will see "mykey" and "mykey.pub" inside the current directory.
  6. "mykey" is the private key and "mykey.pub" is the public key.
  7. Type "mkdir .ssh" to create a folder that will hold the list of authorized keys on the server.
  8. Type "cp mykey.pub .ssh/authorized_keys" to add the public key into the list of authorized keys.
  9. Type "cat mykey" to get the contents of the private key.
  10. Copy the output of the "cat mykey" command and save it in a file with .ppk extension on your machine.
  11. Now startup PuTTy-gen and load this .ppk file you have just saved on your machine and hit generate.
  12. PuTTy-gen will generate a private key file compatible with it.
  13. Hit "Save private key" and save this generated private key file in another .ppk file.
  14. Now startup Pageant.
  15. Hit add key, and choose this compatible .ppk file. 
  16. As long as pageant is running, the Tortoise SVN gets the key from it instead of asking you for password again and again.
  17. ONE LITTLE PROBLEM: if you exit Pageant, then when you start it again, its list of keys will be empty. So, you need to add the compatible private key and to add it to Pageant it will require you to enter the pass-phrase you used while generating the private-key/public-key pair. But this is much better to enter the pass-phrase once per session of Pageant that to enter password many many times within a single session.

Tuesday, September 11, 2012

Superstition

According to Merriam-Webster:
"a belief or practice resulting from ignorance, fear of the unknown, trust in magic or chance, or a false conception of causation"
  • "What apparently grounds the widespread respect in which religions of all kinds are held is the sense that those who are religious are well intentioned, trying to lead morally good lives, earnest in their desire not to do evil, and to make amends for their transgressions."
William James in "The Varieties of Religious Experiences":
"There is religious fear, religious love, religious awe, religious joy, and so forth. But religious love is only man's natural emotion of love directed to a religious object; religious fear is only the ordinary fear of commerce, so to speak, the common quaking of the human breast, in so far as the notion of divine retribution may arouse it; religious awe is the same organic thrill which we feel in a forest at twilight, or in a mountain gorge; only this time it comes over us at the though of our supernatural relations."

Friday, September 7, 2012

Web Basics

  • Client (Web Browser) and server (Web Server) usually talks using HTTP over TCP. UDP-based RTP is better for streaming.
  • Web Browser can read HTML, XHTML and can show pages written in these languages.
  • Cascaded Style Sheets (CSS) help separate design (color, font, etc.) from contents in HTML, XHTML, or XML. CSS has three variants: inline, internal, and external. Inline overrides Internal and Internal overrides External, hence cascaded. The cascading allows controlling individual elements (inline) or page (internal) while having a global control (external).
  • XML is mainly used for data structuring and all tags are user-defined.
  • Extensible Stylesheet Language Transformations (XSLT) helps transform XML into Browser-friendly formats.
  • Client-side scripts or "embedded scripts" help make otherwise static pages, dynamic or interactive. They are kind-of like applets.
  • JavaScript and VBScript are the most popular client-side scripts. 
  • Cookie is kind of cache-info put into my machine by a site (through client-side scripts) to which I visited previously. It has a name, value, and expiry date.  
  • Emails are sent to SMTP server and received from POP3 server. 
  • Active Server Pages (ASP), PHP (originally Personal Home Page, nowadays PHP: Hypertext Preprocessor), and Practical Extraction and Reporting Language (PERL) are popular server-side scripting languages. 
  • Common Gateway Interface (CGI): A script or executable program is a CGI script if it is inside of and executable by the server, triggered by the browser, and the result can be displayed on the browser. So, CGI scripts or programs can be written in C/C++, PERL, PHP, and ASP.

Thursday, September 6, 2012

Web Design

Wireshark issue on Ubuntu

After installation of wireshark on ubuntu, it was not showing any network interface to start capturing packets. Did the following:
sudo dpkg-reconfigure wireshark-common
sudo usermod -a -G wireshark $USER
sudo reboot

Tuesday, September 4, 2012

Octave on Ubuntu

  • To run Octave script without getting into Octave environment, type: octave --silent --eval 'myfactorial(5)' where --silent gets rid of some annoying prints regarding warranties, etc.
  • To turn on syntax highlighting for Octave in vi editor: download octave.vim from here, and copy it into /usr/share/vim/vim73/syntax. Inside /usr/share/vim/vim73, you will find filetype.vim, open it and replace all occurrences of the word matlab with octave and save it. 
  • A less geeky editor would be QtOctave.
  • A beautiful site

Saturday, September 1, 2012

Fractions, from decimal to binary

Say we have 0.625 and we want to convert it into binary. We can write 0.625 = 1*0.5+0*0.25+1*0.125, so in binary 0.625 becomes .101. But we can do this conversion from decimal fraction to binary fraction in a more systematic way:
0.625 * 2 = 1.25 (1.25 >= 1) so first digit after radix point is 1, remainder 1.25-1.0 = 0.25. Now 0.25 * 2 = 0.5 < 1, so 2nd digit is 0; now 0.5*2 = 1.0 >= 1, so 3rd digit after radix point is again 1 and as now remainder = 1-1 = 0, we are finished. Though the second method is more systematic, it is not very clear how it is equivalent to the first one. In the first one we comare 0.625 with 0.5 and as 0.625 > 0.5, there will be a 1 for 0.5's place after radix point and so on. Now, checking whether 0.625 is greater than or equal 0.5 is equivalent to checking if 2*0.625 is greater than or equal to 2*0.5 = 1.0; next, the remainder is 0.625-0.5 = 0.125, now comparing 0.125 and 0.25 is equivalent to comparing 2*(2*0.625-2*0.5) and 2*(2*0.25) or 2*0.25 and 1.0; and so on...

Halving issue in Binary Search

Here is the way to go. In Java: 
mid = (high+low)/2 may give incorrect result. The maximum positive value (in Java) of int is, 2^(31)-1 or 2147483647 (in binary     0111 1111 1111 1111 1111 1111 1111 1111). The problem is that the intermediate value (high+low) could exceed this maximum int value. For example, if high and low, both are equal to 2^(31)-1, then the intermediate value becomes 

 high        : 0111 1111 1111 1111 1111 1111 1111 1111

+low         : 0111 1111 1111 1111 1111 1111 1111 1111
------------------------------------------------------
Intermediate : 1111 1111 1111 1111 1111 1111 1111 1110

And in 2's complement, this intermediate is


2's complement = 1's complement(Intermediate)+1, hence


(1's complement) 0000 0000 0000 0000 0000 0000 0000 0001

(            +1)                                       1
--------------------------------------------------------
                 0000 0000 0000 0000 0000 0000 0000 0010

So, intermediate = -2. This -2 is like

[1111 1111 1111 1111 1111 1111 1111 11]10, where [...] is the sign extension.
Thus mid = -2/2 = -1, which is incorrect.

If we use mid = low+(high-low)/2, that overflow (intermediate exceeding maximum allowed value of
int) never happens, thus gives correct result.
Another incorrect way is mid = (high+low) >> 1; because the overflow has happened already before the shift and ">>" is the signed shift in Java, thus the intermediate 
[1111 1111 1111 1111 1111 1111 1111 11]10 becomes 
[1111 1111 1111 1111 1111 1111 1111 111]1, which is -1. 
The best way is, mid = (high+low) >>> 1. Because ">>>" is the unsigned shift in Java, the intermediate 
[1111 1111 1111 1111 1111 1111 1111 11]10 becomes
[0111 1111 1111 1111 1111 1111 1111 11]11 which is actually the correct mid (= 2^(31)-1).   

Thursday, August 30, 2012

Cisco AnyConnect VPN on Ubuntu

Follow steps in this link. If VPN was connected when Ubuntu rebooted, /etc/resolv.conf may not have refreshed its contents. So, if you cannot access the internet even if WiFi is enabled, please replace the contents of resolv.conf using sudo vi /etc/resolv.conf with the following:
nameserver 127.0.0.1
search gateway.2wire.netp

Friday, August 24, 2012

Love for fonts

My love for Mac was due to its beautiful fonts. Recently I have come to love inconsolata for coding. To install it on Ubuntu: sudo aptitude install ttf-inconsolata

Thursday, August 23, 2012

Java on Ubuntu

  • Match version of java to javac
  • To know the current version: java -version or javac -version
  • To change the current version: sudo update-alternatives --config java

Monday, August 20, 2012

Sighins...

Debugging and Commenting

  • Jamie Zawinski: Prints. Assumptions and what it does. Layout of data structures [rfc style ?]. What is this for? What's the range of inputs? Long variable names as descriptive as possible except for loop iterators.Digging into an API and figure out which part is needed and which is not is important now.
  • Donald Knuth: The CWEB System of Structured Documentation. The problem is that coding isn’t fun if all you can do is call things out of a library, if you can’t write the library yourself. If the job of coding is just to be finding the right combination of parameters, that does fairly obvious things, then who’d want to go into that as a career?
     

O. Henry

  • The Princess and the Puma: Intriguing, finishing might be a bit of an anticlimax though
  • The Gift of the Magi
  • Springtime a la Carte
  • The Caliph, Cupid, and the Clock
  • The Romance of a Busy Broker: Sweet surprise
  • The Higher Pragmatism
  • After Twenty Years
  • Schools and Schools
  • The Defeat of the City
  • From Each According to His Ability

Sunday, August 19, 2012

Poogramin

  1. Easy Set of Video Lectures on C#: http://www.youtube.com/watch?v=SXmVym6L8dw
  2. http://c.learncodethehardway.org/book/
  3. Few C problems
  4. http://htdp.org/
  5. http://book.realworldhaskell.org/
  6. http://hop.perl.plover.com/
  7. http://mitpress.mit.edu/sicp/full-text/book/book.html
  8. Effective Java
  9. Java Generics and Collections
  10. Java Concurrency in Practice
  11. Dependency Injection
  12. Java Reflection in Action
  13. Restful Web Services
  14. RESTful Webservices with JAX-RS
  15. RESTful Webservices Cookbook
  16. Programming in Scala
  17. JavaScript: The Good Parts
  18. Coders at Work
  19. Modern Compiler Implementation in C 
  20. http://www.superfrink.net/athenaeum/OS-FAQ/os-faq.html 
  21. http://linuxgazette.net/issue77/krishnakumar.html
  22. http://mikeos.berlios.de/write-your-own-os.html#asmprimer 
  23. Developing your own 32-Bit Operating System
  24. http://joelgompert.com/OS/TableOfContents.htm
  25. UNIX Network Programming
  26. TCP/IP Illustrated
  27. The UNIX Programming Environment
  28. Understanding the Linux Kernel
  29. The Standard C Library
  30. Advanced Programming in the UNIX Environment  
  31. The Pragmatic Programmer
  32. Code Complete
  33. Clean Code 
  34. Lion's Commentary on UNIX 
  35. MacPaint and QuickDraw Src Code 
  36. Ten papers 

Saturday, July 21, 2012

Wednesday, June 27, 2012

Droidland


  • Motodev SDK for Android
  • DroidDraw 
  • android:onClick attribute of Button lets define a method to be implicitly declared as OnClickListener

Wednesday, June 13, 2012

How to reverse engineer an apk

Two steps:
  1. Rename apk to zip and use 7zip or any other utility to extract the contents. Inside it there is a dex file. Use this dex2jar tool to convert the dex file into jar and then use JD java decompiler to decompile the jar file.You will get almost all the codes except for the xml files, like manifest and layouts. For those follow the second step.
  2. Use apktool.

Wednesday, May 30, 2012

Install Unlimited Policy Files on Windows

If you are using jdk1.7, download these Unlimited Java Cryptographic Extension Policy Files. After extracting, you will find two jar files: local_policy.jar and US_export_policy.jar; copy these two files to the two JRE/LIB/SECURITY directories (one is under jdk and one is at the same level as jdk).

Sunday, May 27, 2012

HTTP Live Streaming for iPhone

  1. Here are resources from Apple.

Where Are iPhone Simulator's Files on Mac

In the "Finder", in the "Go" tab, select "Go to Folder" and copy-paste "~/Library/Application Support/iPhone Simulator/" and hit Go button. That's it!

A Separation

I had been thinking of watching it for some long time, but as it is an Iranian film and as I am not very fond of them, I procrastinated. Eventually, I got into the mood and watched it. I liked it. A great movie. It has a serene flow like a murmuring rivulet, comparable to Roy's Song of the Road.

Saturday, May 26, 2012

Curricular Practical Training (CPT) Process for Summer Internship

If the internship is related to your research work, you (F1 student) may get CPT to work as an intern in a company. This page describes the basic steps. Marquette sees CPT as a course (1-3 credits). So, you have to register for the course. You have to get a permission number (from department office) for the course to register. For each credit you are going to register, you are allowed to work for at most 100 hours. So, if you work 40 hours a week for 3 months, you must register for at least 3 credits. And if Summer courses are not supported by your scholarship, the money for the registration has to be paid from your own pocket. In the CPT request form (2nd link in the page), you have to get signature from your academic advisor, from the internship coordinator (for Summer 2012 MSCS department's coordinator was Dr. Madiraju), and from your employer (for internship). It is better to get signature from the employer and academic advisor first and then take signature from the internship coordinator. If your employer is nonlocal, you may need to send a scanned copy of the advisor signed form to your employer and then get a scanned copy signed by your employer and then get signature from the internship coordinator. The internship coordinator needs to know who your employer is, employer's address, phone number, email address, how many hours per week you will be working, details of work responsibilities, and the start and end date of your employment. Usually all these information will be included in the offer letter you receive from your employer. So, submit this offer letter to the internship coordinator while you get signature from him/her. Make sure that the end date of your employment is before the beginning of the Fall semester.
Now, you have your CPT request form (one copy has fresh-ink signatures from your advisor and coordinator and the other copy has adviser-coordinator-employer signatures probably scanned because your employer may be nonlocal), the offer letter, the print-out of the email in which your employer sent you the offer letter, your I20, and your passport. Make an appointment with one of the Office of International Education (OIE) advisers (Here get the names). On the date of the appointment take all the documents mentioned before and meet with OIE adviser. It will not take more than 10 minutes to get approval. The OIE adviser will ask a few easy questions and will provide you with a new I20 (which includes the work approval for internship) along with the old one and you are done!

Saturday, April 14, 2012

Porco Rosso

Sometimes, you know from the very beginning, this movie is going to click. Porco Rosso is such a one.

Thursday, March 15, 2012

The name of the rose

The story of a monk who sees beyond the letters of the scriptures and his young apprentice and how they went on investigating a series of mystery crimes. A well made cinema.