Support Wikipedia

Wednesday, March 17, 2010

Connect Open Source on Mac.

Last night I was working very late till 2AM on building the source code of Connect ( on my Mac. They didn't have instructions for Mac so I had to use the Linux instructions which almost worked as it is but there were a couple problems as Netbeans 6.7.1 had a directory name with space in it. Also the sudo had to be run with -E option in order to preserve environment.

It took me alot of patience to build the whole source code using ant coz the java was running out of space. I had to kill every process except the essential ones and finally it completed with 1760m of memory. The whole code base was about 5.31Gb after the build is completed. I've never in my life built such a huge code base with any tool.

But I'm glad it was success. Although, I still need to work on deploying it.

My good friend Lisa was also up all night keeping company as I was doing this. I sincerely thank her for her support. Lisa, I couldnt have done this without you. Thanks!

P.S. : Will keep posted on how it goes with the Deploy.

Tuesday, March 09, 2010

Juniper Network Connect on SnowLeopard Installation and Fix

I've recently reinstalled Snow Leopard on my Mac and that started it all. My work needs me to VPN into servers which I just cannot get to without VPN in my new mac. I had to kiss goodbye the lovely "Work from Home" option as I have to be in the office all the time. Although, its not required everyday but its always a good option to have. When I try to start VPN it just silently quits with no error nothing. If there was an error, I can google it but there is nothing which was annoying. It jus does not give me anything error.

I googled every possible combination of the words "Juniper Network Connect", "Mac", "Snow Leopard", "install", "fix", "troubles" etc. but everyone seems to say the same thing. Basically, they all say that I had to do this.

sudo chmod 755 /usr/local/juniper/nc/[version number]/
sudo mkdir '/Applications/Network'

But to do this I have to have Juniper NC installed first which I dont have. And to add to that, I cannot get any installer anywhere for mac. I am not a registered user at Juniper's site so I cannot get my hands on the installer there. My VPN server does not offer it as a download. So, I was hopelessly lost for a while until It struck me that most of the universities use VPN so they have to give out the installer on their sites. So, I Googled for "juniper network connect mac site:*.edu". the site:*.edu is there coz most of the universities have their sites end with .edu and bingo I found this link here from UMBC. God bless UMBC!

At the bottom, I found the link to download installer for Network_Connect_OSX10_5.pkg

I know what you are thinking, this is for 10.5 and not 10.6. I do know that I am on Mac OSX 10.6 but this gave me a way to install something atleast and I thought older version is better than no version at all right? may be I can update it later or as long as this works who cares which version it is right?

So, I installed it ASAP, logged to my VPN server and tried to start the client but this time it threw an error

An actual error. This is progress. THANK GOD!

So, I google this error and found a solution here

Basically, what it means is that some idiot at Sun decided to change the password to keystore from "changeit" to "changeme" that prevented the Installer from accessing the keystore as it was using the old password. So, the fix was to change the password back to changeit

sudo keytool -storepasswd -new changeit -keystore /System/Library/Frameworks/JavaVM.framework/Resources/Deploy.bundle/Contents/Home/lib/security/cacerts -storepass changeme

Note: The above is one single command so it should be in one line. Please make sure there are no extra spaces or new lines.

After updating the password to the keystore, I logged in again into my VPN server and started the client. It updated my Network Connect and I was successfully connected to my VPN.

Finally a fix that works. I now have Network Client 6.5 running on my Snowleopard i.e Mac OSX 10.6. Yeyyyy!

So much for VPN huh?

Sunday, March 07, 2010

Teaching : Web Development Course (PHP) Completed

I've always thought of myself as a good teacher even though I've never really taught anyone. And a month or so ago I've got an opportunity to teach online. Teaching is a very tough task let alone teaching online. Its never easy to teach online as you miss that human factor. It sometimes felt like I'm talking to my laptop but I kept reminding myself that there is another person watching this on the other end (thankfully not behind the screen). Teaching online gives you the freedom to be creative. You are not tied to a single room or computer - the whole web is your teaching ground. I've used Skype for talk and TeamViewer for desktop sharing. These great apps have opened whole wide world to me. I sincerely thank their creators and applaud their efforts to keep it free and amazing.

I've played around with PHP long ago in 2005 when I was massively obsessed with the language for its quite and dirty programming model. Since then I've never really got a chance to dig deep as my career as a Java developer took off pretty much unexpected. But PHP has always been my choice of language to quickly test something or play around with new ideas. So, when I saw a chance to pick it up again I jumped and it was well-worth it. I've bought three books "PHP and Mysql Web Development - Fourth Edition" by Luke Welling, "PHP In action" and "PHP, MySQL & Javascript" by Robin Nixon. These books are a must if you wanna be serious about PHP. I'll blog more about these books later.

Back to the Course, I've tried to make it a web-development course rather than just a PHP language course. I dont know how far I have succeeded in making it so but I sure have tried. I had just one student and that made it pretty interesting as I've always preferred One-on-Ones to Groups. My student is completing her M.S. from a Univ here in USA. She has been very obedient (true to her name actually) and hard working which pushed me to my limits. She is also very very good listener which is a blessing. I could not have asked for a better student to start my teaching journey. Thank you Vinaya!

Today we completed the PHP course. Here is the list of the topics we covered as part of this course :
1. Web and the evolution of Internet
2. History of HTML
3. Basics of HTML, XML etc.
4. Apache - web servers, inteactions, communication, configuration httpd.conf, php.ini and my.cnf etc.
5. Programming Languages - Origin and types
6. Java Origin
7. Object Orientation
8. Functional Programming
9. PHP - History and Evolution
10. Installation and Setup
11. Basics of PHP and server scripting languages
12. Syntax and Semantics
13. Variables
14. Arrays
15. Operators Arithmatic, Assignment, Logical and Comparision
16. Branching and Conditional Statements (if, else, if-elseif-else, switch)
17. Looping (while, do while, for, foreach)
18. Functions (Call-by-Value, Call-by-Reference)
19. include, require, include_once and require_once
20. Forms
21. Built-in Variables ( $_GET, $_POST, $_REQUEST, $_SESSION, $_ENV, $_GLOBAL etc.)
22. Magic Constants ( __CLASS__, __FILE__, __LINE__)
23. Embedding HTML in PHP and vice-versa
24. Object Orientation in PHP Vs Java
25. Class, Object, attributes, methods, interfaces
26. OOP concepts in PHP :Encapsulation, Abstraction, Polymorphism, Inheritance etc.
27. Class and its anatomy : __construct(), __get(), __set(), __call(), __destruct();
28. Objects and related concepts like overriding, constructors etc.
29. Access-modifiers i.e. public, private and protected
30. Static methods and variables
31. Late Static Bindings
32. Polymorphism through __call()
33. Multiple Inhertance through interfaces
34. Abstract Classes
35. Utilities like clone and __tostring()
36. final methods and constants
37. Iterators and implementing them using IteratorAggregate
38. Timestamp and Date functions and manipulations : mktime(), Date() and time()
39. Reflections
40. File Manipulations i.e. fopen, fgets, fgetc, file_get_contents
41. File Upload : form, moving, displaying
42. Image manipulations like generating thumnails realtime
43. Cookies
44. Sessions
45. Login and Remember Me scripts
46. Error Handling with onError, try - catch, Exceptions, error_reporting, levels, throws, re-throws etc.
47. Filters - Validating, Sanitizing etc.
48. Built-in Vs Custom filters
49. Databases - basics
50. Mysql basics and administration with Mysql GUI tools, phpmysadmin and commandline.
51. Installation and configurations
52. Accessing Mysql from PHP
53. CRUD application
54. mysql_ functions vs mysqli_ functions
55. Object Orientation with mysqli
56. ORM : ADODB etc,
57. Query vs Prepared Statements
58. ODBC functions as well as different database connectivity
59. Javascript - complete with variables, constructs, functions, array, associative arrays, events, event-handlers etc.
60. Object orientation in Javascript
61. Cross browser compatibility
62. AJAX basics
63. XMLHTTPRequest Vs ActiveXObject
64. generating a request
65. submitting data realtime via GET
66. Suggestions scripts using POST and GET
67. Javascript involved in AJAX and the server scripting with PHP
68. AJAX with XML
69. AJAX with Database connectivity
70. JSON concept only
71. CSS
72. selectors, IDs, classes,
73. pseudo-classes
74. Box Model etc.
75. HTML Tables and design
76. CMS e.g. Drupal concepts
77. Frameworks vs libraries
78. CakePHP and Zend Framework and Webservices with nusoap concepts
79. Command-line php usage.
80. Command-line Mysql and utilities like mysqldump and export to csv.

I think I've covered almost all the basics as well as advanced topics in PHP with some exclusions like mail and stuff. So, finally a huge task completed in about 30 odd hours (who's counting) :)
Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia