Saturday, October 26, 2013

Bibliophilia: Bond...Ruskin Bond!


Got my hands on a short story collection of Ruskin Bond, the famous Indian children's story writer. This collection is titled, "Potpourri", which means "a mixture of things" or "a mixture of dried petals and spices placed in a bowl to perfume a room". Origin, French - a rotten pot.

The meaning and the origin are the courtesy of The Oxford Pocket English Dictionary which I have here by my computer table with its hard-covers ripped off with a few pages indexing the words initialized by 'Z', missing. There is nothing more satisfying to a reader (and a writer) than a worn and dilapidated dictionary. It is...so fulfilling. Just by looking at it for a few microseconds you begin to feel proud/content with your vocabulary and literary achievements. If placed on a coffee table or somewhere in the living room, it will surely elicit praise and admiration from your guests and friends, as a symbol of your literacy and knowledge. (Irrespective of the fact that I have weak spelling retention but, a great meaning retention capacity.)

This gives me an idea...(link to my another post on the digressing idea, in order to keep the blog posts themes and premise in a more consistent and terse fashion).

Returning, to Ruskin Bond, short stories at hand. Ruskin Bond's stories that I've read right now are: "Our Great Escape", "Gone Fishing", "Susanna's Seven Husbands". Some of the stories of which I have some recollections are: "The Girl on The Train", "The Earthquake" and the poem: "Do you believe in Ghosts?".

Currently, my personal favorite of Ruskin Bond is "The Girl on The Train". Hush! I need not whisper anything about it, or, it'll become a spoiler! Short stories are more delicate than novels, you know.

This book happens to be with Ruskin Bond's personal commentary appended with the stories and a recent introduction (July 2007). A lot of funny idiosyncrasies and genuine humor is sprinkled in the introduction. His ideas and thoughts in the introduction are thought worthy and must be reflected upon.

The stories I have read are beautifully simple, lucid and yet rich with realism and emotion. Best fit for children's short stories and some deep thought provoking questions for us mature readers, too. Nonetheless, I am having a nice time reliving my childhood days and his life experiences via his narratives. I gotta buy me one of those hard-bound complete collections of Ruskin Bond as well as the complete short stories of Miss Marple and Hercule Poirot, by Agatha Christie.

I also am continuing my reading of Isaac Asimov's "The Rest of the Robots", already, mentioned in my previous blog post. (Link appended at the end.) This time completing the Section 2, titled "The Laws of Robotics" comprising of two shorts: "The First Law" and "Let's Get Together". I also, chanced upon an e-comic with the first three collected issues of "Transmetropolitan", one of the great graphic novels ever made.


Though not famous, Transmetropolitan, directly touches issues of grave importance in the current world spiraling towards becoming, Police States with growing corruption and injustice. It also, in the first three issues, beautifully shows the effects of alienating segments of society, discrimination, civil unrest/strife and the cruel actions of the government. Facts, themes and ideas that no longer are mere fiction but, now, resonate with recent world events and sociopolitical situation. And, the comic series being a Vertigo imprint is geared towards mature readers.

Meanwhile, delving deeper in, Asimov's, "The First Law", short story which records the first ever event of a robot's decision to override the hard-wired "First Law" which is;
"A robot may not injure a human being, or, through inaction, allow a human being to come to harm."
This overriding was due to the fact that it had begun to feel emotions and love (and subsequent attachment) which made it disregard the First Law in order to fulfill the demands of Love. I re-think this simple idea in the human context. Isn't this the very rule we violate in order to fulfill the demands of our love and other relationships. Isn't love the reason that one will go to war against someone else or avoid saving others in order to protect one's own self-interest (lovers, attachments etc)?

In turn that our attachments are the reason we will violate logically foolproof rules of peaceful self-existence. Doesn't the thief punished by law become a victim of circumstance and fate when his family is starving in poverty? Then why is Justice, blind? And, if it always meant to be blind then why do we tolerate such a system and not evolve it to incorporate the greater aspects of guilt, blame, sin and forgiveness.

Does that mean our self-interest is short-sightedness and our attachments are shackles binding us to err? Or is our defiance of this law, for short term self-interest truly or appropriately rewarding for us? Does this mean that we will always, sooner or later discriminate against someone or the other in order to favor those whom we are attached to (emotionally, socially etc)?

Maybe, this makes me feel a little comfortable with myself and my personal philosophy of perfect detachment and stoicism. Without emotions one will always make correct decisions but, then we also need humanity and morals to guide our laws and decisions for the greater good.

The other story, "Let's Get Together", is a modest mystery story with some adequate logical argument, mystery, challenge and strategy set in a fictional futuristic world of prolonged Cold War between the East and West (referred as "Them and Us"). Short, but, decent considering the age it was written in. Though, modern day marvels like Death Note, the Japanese Manga/Anime would make this look like ancient obsolete flint tools.

Books Discussed:

1. Potpourri by Ruskin Bond (Mixed Bag of Fiction, Autobiography, Poetry, Romance, Mystery, Supernatural, Horror and Humor)
2. The Rest of The Robots by Issac Asimov (Science-Fiction, Classic, Robots)
3. Transmetropolitan by Warren Ellis - Vertigo (Comic, Mature, Dystopian Future, Social and Political Satire, Science Fiction)
4. The Oxford Pocket English Dictionary - Oxford University Press

Books Mentioned:

1. Complete short stories of Miss Marple by Agatha Christie.
2. Complete short stories of Hercule Poirot by Agatha Christie.
3. Death Note a famous manga and anime.

Con Art: Forging the Used Look

There is nothing more satisfying to a reader (and a writer) than a worn and dilapidated book. It is...so fulfilling. Just by looking at it for a few microseconds you begin to feel proud/content with your vocabulary and literary achievements. If placed on a coffee table or somewhere in the living room, it will surely elicit praise and admiration from your guests and friends, as a symbol of your literacy and knowledge. (Irrespective of the fact that you've read it or not.)

IMG070 

This gives me an idea...I should pick up a few second hand encyclopedias or thick voluminous books like War & Peace, Lord of the Rings or instead defile some of the technical programming books I have lying around here being rarely used  and in mint condition, How to Program Java by Deitel & Deitel would work wonders. Having watched a few seasons of White Collar and one movie, The Invention of Lying, I've been quite educated in the art of forging the rugged, aged and worn out look and feel in artifacts.

A few coffee stains, spills here and there. Folded pages. Randomly underlined texts (a personal experience from trying to highlight important portions of course books which inadvertently ended up coloring the entire book, instead of specific important sections). A few A4 printing sheets scribbled with notes, diagrams and barely legible re-quotations from the texts bibliography, index and chapter summaries. These A4 sheets can be aged by again spilling them over with drinks, food stuffs (avoid the cooking oil-stains - it looks unprofessional and makes you look sloppy), ink spills and then blow dried with a hair-dryer. The blow drying will create a little discolored tone representing age (Thank you, Neal Caffery!).

I saw the protagonist of The Invention of Lying, dousing the document in coffee, to colorize it. Though, I've no personal experience with it (coffee).  Oh! I forgot to mention some of these new printing pages are specially treated to avoid yellowish colorization which would make it quite difficult. Then, go for cheapest available A4 sheets or ripped out notebook pages. Also, fold the book carelessly to create the creases and folds in the covers, in case of paper backs.

Voila! You've successfully faked the use of your voluminous books that you abhor reading and yet, can con your guests in believing otherwise!

My personal tip: Read the Wikipedia summary of the books to get a brief idea in mere minutes before bluffing, else, your intelligent and knowledgeable guests will call your bluff. In my personal experience I have completely conned my old teacher who had assigned us to write a paper on Noam Chomsky.

Addendum:

I have one (proudly) unique habit of using playing cards ranging from "Duel Masters", "Yu Gi Oh!", "Magic: The Gathering", Standard Playing Cards and other trading card games (like Pokemon, which I abhor. The set of cards was an old gift, by the way. And, sports player flash cards) as bookmarks.

IMG072IMG071
Keep a deck around anytime and just place one card whenever you need to bookmark.

How this adds to your forging the used look is by adding a card/book-mark every few chapters. The voluminous the book is the better the placing of the bookmarks appears. Those who are aware of your habit and practice of such book-marking will assume you've read a lot of the text and considered marking the pages for future reference.

I got this idea after my personal experience of bookmarking voluminous programming books. I used to first brainstorm a software/program I'd want to build. Then, I'd explore the Index and the Glossary for requisite locations and sections of text I'd have to refer, read, learn, understand or just mark for future reference.
Many a times I bookmarked all those important sections I did NOT know and intended TO DO. My friends would look at me holding the book with all its bookmarks jutting out and remark that I had thoroughly studied the material. When I tried to explain them my  purpose of bookmarking, they still did not believe. In hindsight I can say that, if I did not know the actual material but, would surely know which page, chapter and section to look for answers.

Other Links to Checkout:
1. White Collar TV Series.
2. Hellblazer comic which tells the tale of the world's greatest conman and occult detective.

Monday, October 21, 2013

Bibliophilia: Asimov, Milton and More...


Been reading some real hard-copy books now a days after a long long time. The last hard-copy book I read out of my college curriculum was "Mysterious Mr.Quin" by Agatha Christie, a collection of mystery and crime themed short stories with a mystical twist. That was way back in '09, I believe. Since then I read a few e-books, but, nothing beats the smell and touch of printed paper. The feel of a book in my hands actually starts background thought processes, I feel, within me that gives me an immersive experience. Ideas, imagination and links with existing knowledge is formed. Meanwhile reading a digitized e-book version is an ersatz; It maintains an elusive detachment and requires greater concentration and effort to grasp the text. I'll blog in another post on my recently read e-books.

  

I picked up two books from an airport bookstore on my way back to Patna from Delhi. The first was an earlier read book, "33 Strategies of War" by Robert Greene; A very good book which assimilates and distills 33 strategies of war from history. Superfluous with facts and beautifully informative side-notes running parallel stories, from history, in depth with relation to references in the main text. I had read this book earlier when in High School. I had borrowed it for almost a year from my elder cousin brother and had to return it with a lot of text unread, not understood or, now, forgotten. This time, I am working through it slowly and memorizing the narrated stories and strategies for longer retention. (Thanks to a couple of memorization tricks and techniques I've mastered. Though, I'll not be
able to memorize the text verbatim.) 

 

The second book I bought was "The Rest of The Robots" by Isaac Asimov, the classic science-fiction writer. His works mostly have a robot theme with a socio-philosophical premise. It is a collection of short stories by Asimov. There was an offer going that time of 3 books for the price of 2 by the publishers Harper Collins, but, I did not find any other intriguing book by Asimov or any other author that would've made a set of three. (The other book with multiple copies was I,Robot by Asimov which I had seen as a movie starring Will Smith.) Hence, I settled for this one only. 

I, a few minutes ago, completed it's 1st set of stories from it's three groups; "The Coming of The Robots". Novel and decently humorous, I'll rate them. A lot of fancy science buzz-words have been sprinkled, as was common in those days (I'm talking about the 1940s, people!), which does not quite impress or affect me as was it's intention for readers then. Maybe due to my exposure and understanding of a lot of modern day science and science-fiction, makes it taste a little bland. Still, the stories do give an entertaining experience, considering the time they were written in, and ignoring my encyclopaedic knowledge of science-fiction.

This book that I bought also combines introductions by Isaac Asimov, himself, which explains the themes and premise he has structured his stories upon. He refers to Frankenstein and Faust to have primarily forced his thoughts and story themes to go in the direction they took. I am very much aware and know of both Frankenstein and Faust but, personally have not read any of these works (other than in cartoon and comic variants, especially in DC Comics). Faust is primarily a supernatural, moral and horror themed story while Frankenstein is based in horror and rudimentary science.

Personally, I found the short, "Victory Unintentional", quite amusing considering people of the characteristics and mindset of the Jovians (Dwellers of Jupiter) do exist. Go read the story if you want to know. Here's a link to the book on Amazon. (And, that is because some good products are Fulfilled Amazon; which means they personally package, send/receive in case of returns for free and is eligible for cash on delivery. Meanwhile, Flipkart still sucks. Good luck paying extra 
while you could've saved it for some other book.) 

 

I've also picked up John Milton's poem-book, "Paradise Lost", which makes it a difficult read. (But, thankfully not as difficult as "You're not a Gadget".) Old style poem-prose with Biblical theme and cast of characters, unknown to the modern eastern reader, would make it an instant turn-off. Though my knowledge of the myths, supernatural and religious materials is great enough to create sensory overloads, the book still is a slow read. The prime reason I'm reading this is due to its protagonist. The protagonist of the story is Satan and the entire Biblical chain of events and theology is narrated and shown from his perspective which makes for an interesting read. Plus, it has some really fancy texts. Take this for instance;


A mind not to be changed by place or time. The mind is its own place, and in itself Can make a Heaven of Hell, a Hell of Heaven.
Then there is one really strong rebellious dialogue worth thought;
Better to reign in Hell than serve Heaven.
But, what a great/foolish/masochistic decision, I'd say!! Reminds me of the concluding conversation between Dean Winchester and Castiel in Supernatural TV Series Season 5 Episode 22: Swan Song. (I'd recommend you to see the series from the start but, you can also gather enough emotion for this thought provoking reply by watching only seasons 2/3 to 5). Owning a hard copy of Paradise Lost does make it good for underlining texts. So, here's the link; (Be forewarned! I don't know which themes does it touch as I've not read it entirely yet. Just gotten my feet wet and this is a freaking long poem running 280 pages and was initially published as a set of 10 books back in the year 1667, and you thought Harry Potter was unnecessarily long?) Finally, I've been skimming the various models in the book, "The Decision Book" by Mikael Krogerus and Roman Tschappeler, another non-fictional semi-technical book. Got it from Amazon, hardcover and all at only Rs149!! (One, of the reasons for my new allegiance to Amazon India.) Good book but, not for everyone. So, watch out and make sure it's worth your cash. For (a confused, a million thoughts & ideas a moment - brainstorm afflicted guy) me, it was totally worth it. Learned and tried out the first Eisenhower Matrix.
Books Discussed:
  1. 33 Strategies of War by Robert Greene (Non-Fiction, History, Strategy)
  2. The Rest of The Robots by Isaac Asimov (Science-Fiction, Classic, Robots)
  3. Paradise Lost by John Milton (Long Poem, Classic, Biblical)
Books Mentioned:
  1. The Mysterious Mr.Quin by Agatha Christie (Mystery, Crime, Enigma/Paranormal)
  2. Frankenstein by Mary Shelly (Science-Fiction, Horror) - I must read later.
  3. Faust by Johann Wolfgang Von Goethe (Supernatural, Horror ??)- I must read later.
  4. The Decision Book by Mikael Krogerus and Roman Tschappeler (Non-Fiction, Meta-thinking, Life, Mind)

Friday, September 20, 2013

A simple way to send your mails in Java; Java Mail API

I had played around with Java Mail API last year for a competition (while I was in college) where my team was assigned to build a system which would send bulk mail customized by the sender to a list of recipents as per their age and gender. I built the core messaging system in fifteen minutes or so, thanks to Java Mail!

Though Java Mail is said to be more complicated and low-level than any (most) other Java APIs around. I found sending a simple email pretty easy.

The entire source code (which is comfortably small) can be divided into specific part;

1) Properties of E-Mail Service:

Here, I've setup the properties initializing them in the Properties object - java.util.Properties, provided by the Utility Class - java.util.

        Properties props = new Properties();
    props.put("mail.smtp.host", "smtp.gmail.com");
    props.put("mail.smtp.socketFactory.port", "465");
    props.put("mail.smtp.socketFactory.class",
                   "javax.net.ssl.SSLSocketFactory");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.port", "465");

2) Starting the Session by logging in using the Authenticator from JavaMail.

          Session session = Session.getDefaultInstanc (props,new  javax.mail.Authenticator()
            {protected PasswordAuthentication getPasswordAuthentication()
             {
                 return new PasswordAuthentication(target_email,password);
             }
            }
        );

Here, you'll need to enter your EMail service provider Username (with the postfix @yourhost.com) and the password. I used a Class attribute to keep the password, sender email ID and the recipents email address.

    public static String password = "mypassword";
    public static String sender_email = "iam.legend.n@gmail.com";
    public static String recipent_email = "md.naseem.ashraf@gmail.com";

A better way of fashioning this code is by setting up these attributes as private and keeping an Arraylist of recipent's email address which would be fetched, altered and mainteained separately.

3) Sending the MIME Message (the actual E-Mail message):


try {
        Message message = new MimeMessage(session);

        message.setFrom(new InternetAddress(sender_email));
        message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(reciever_email));

        message.setSubject("EMail Subject!!");

        message.setText("Congratulations!!" +
                        "\nYour EMail has been successfuly recieved by this EMail client.");

        Transport.send(message);
        System.out.println("Message Sent!!");       
        }

        catch (MessagingException e)
        {
                throw new RuntimeException(e);               
        }

This block of code is self-explanatory. Some specific options I'd like to talk about, required to customize our E-Mails are:

1. message.addHeader(String ....)

Useful to add headers to E-Mails which are used by E-Mail Clients to sort, classify and identify emails. This is pretty useful now a days with GMail's new layout where E-Mails are classified as Standard, Social (Group, Mailing Lists etc) and Promotions (Advertisements) under respective tabs.

Though I'm finding it annoying in the new layout to open multiple emails simultaneously in separate tabs. Thus, I stick to basic HTML layout which has the plus point of being super fast.

2. Message.RecipientType.XX - You can set, TO (To a single prime recipient), CC (Carbon Copies) and BCC (Blind Carbon Copies) in the Recipient Type.

Example:

message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(reciever_email));

message.setRecipients(Message.RecipientType.CC,InternetAddress.parse(another_email));

3. message.setFrom(X) - You can also set the sender email address specifically in the mail even though it will be identified by the EMail client.

Example:

message.setFrom(new InternetAddress(sender_email));

Note that the string sender_email usage with InternetAddress.

CONGRATULATIONS!!


You've setup your Java program to send E-Mails. Some of the ways you can put added functionalities would be by creating a good String creation method which would arrange the message text and then add to "message.setText(...)" method.

I'll be soon studying about recieving and processing E-mail with JavaMail. Will blog about it later.

ADDENDUM:

Source code is added here -
https://docs.google.com/file/d/0B4e1TZA7mwrNV01rTDBrQVluc3M/edit?usp=sharing

Saturday, August 17, 2013

NexusGrapher2: An exploration deeper into the JUNGle

I've recently got a lot of free time on my hands and thus decided to upgrade my previous tool; NexusGrapher [Note: Previous work with JUNG is linked here] by utilizing the large set of features provided by JUNG2.0 (Java Universal Graph/Network Framework) and adding some more features to it's data handling capabilities. Earlier it only used to draw Graphs of data stored as CSVs (Comma Separated Values) in text files.

Features of NexusGrapher2

  • "Graph Themes" to use predefined graph visualization attributes for different color, shape and sizes of vertices.
  • "Data type Discriminant" feature which let's user's customize different vertex shapes for numbers, strings etc for graph elements.
  • "Multiple Layout" facility from which user can choose a certain layout to display his graph in.
  • A "Query Engine" which will process data from text files, CSVs etc and return a Graph visualization of the query. [wip = work in progress]
  • The Query Engine will also be usable to make graphs directly with small instructions/commands. [wip]
  • Graph Image and Data saving facility as well as ability to read saved Graph data to rebuild graphs. (I know using GraphML will ease the task exponentially but it deals with bulky XML formats).[wip]
  • "Graph Comparator"; A feature to facilitate comparison of two graphs and also a facility to plot graphs with changing data-sets/attributes in order to be overlapped and observed for differences. Another useful additional feature would be to merge different Graphs and alter graphs (elements, vertices, relations, vertex attributes etc.).[wip]
 Here are the screen-shots.of some themes I have coded into the source code. If you wish to contribute to this project do send me an e-mail regarding it.

Screen Shots:

"Happy" Theme


 "Gotham Theme"


"Tech_Noir"  Theme



Reference:

Wednesday, August 14, 2013

Survival of the Fastest: Software Development

Today instead of talking about code and my previous projects I would like to talk about something really important for all of us coders/programmers and any one even remotely associated with it. Today's topic for sermon is "Speedy Software Development".

I know that the best of you, readers (which I hope is most of you readers), know about Agile Software Development Methodology. (Don't sweat! If you don't know, then look up the "Further Reading" resources links at the bottom of this post). It's an innovative way of developing software in the fastest means possible. But, what if I say some (additional) simple techniques could yield a faster method? Some of you might be aware of the techniques and tricks I'll be discussing today and none of what I'm writing here is novel.

So, let's cut to the chase;

Open-Source

You are not alone (in your problems). Someone somewhere sometime has already tackled with your requirements and problems. All you have to do is embrace his legacy and yes, credit him for his contribution. Most of all the major problems we face has been presented in an optimized and professional open source package. Companies and programmers, alike, must learn to leverage it for rapid software development. You don't want to reinvent the wheel. Do you?

For the n00b:

A lot of new programmers and students overlook this useful resource and later, over the years, they gain the wisdom of using Open Source Technology. So, it's my best advice to anybody new to the coding community to immerse himself or herself into Open Source Projects. I'm not saying you need to contribute to it. I'm saying to learn and use it in whatever project you want to do. Reading and studying Open-Source code will also make you a better programmer. You'll often stumble into some new repository or API which will showcase you great new features which you had never dreamed/thought of before or previously considered impossible owing to your naivety in the subject.

For the PRO:

For the professional it is of utmost importance to keep up with the latest developments in his/her field of expertise. Open Source software and APIs can also use some polished distilled wisdom for upgrades and new features which seasoned professionals are replete with. This will also help team leaders, software architects and researchers to decide, plan as well as utilize the cutting edge of current times for the best delivered projects and solutions.

For the Company!!

Now, comes the important part. Companies worldwide can help in the Open Source Initiative by kind or cash. They can help by allowing employees to work on certain OS projects when they're free or assign employees (without any current tasks/projects) tasks to either contribute or use OS to build new products for the company or even the world at large.

Also, when companies devote teams and departments to Open Source Initiatives they can seek funding and donations from other companies for such projects and gain a small share of profits over it or at least balance the overhead expenses to make it a non-profit. Giving burned out or overworked/pressed employees the option to switch to a deadline free OS projects will recuperate their coding spirit and mind, while staying on the payroll and not costing much capital for the company (considering its funded enough with OS donations).

Automation, Code Generation and Company Project Repository

Ever found your task to be repetitive and boring? Does you work feel like it should be done by a robot? Well, then build one (or use one)! What I'm most surprised at is that even experienced programmers and experts get into this kind of menial chores. They either copy previous source code or unintentionally repeat large chunks of project components already developed earlier by someone else in the same company for some other client.

The Archive

 In the era of paper dominant office days and even now, a lot of offices kept archives of projects and documents for future reference. This is most useful to tackle repetitive tasks like building a web-service, a database driven desktop application etc. Over the days, months and years an organization will continue to accumulate a lot of achievements and accomplished projects under it's belt. This when well preserved and circulated among the coders as a library of information/samples will be a boon for rapid software development. 

Question: What is common between an application which maintains pharmacy inventory and a grocery inventory application? 

Ans: A lot! There is a lot of similarity in database schema, application logic and even business usage. Then why don't we just re-purpose the previous grocery store app to handle our new pharmaceutical demands? This will save you a lot of time to work on the core features of this new pharmacy inventory system. You may want to add a small feature that will notify alternative drugs or harmful drug combinations which may have been prescribed incorrectly by the doctor.

Thus, every IT or software development company must keep a unified distributed project repository which can be accessed by an employee in any of it's branches worldwide with a click of a button. Think of it? How simple will our tasks be? But then there are certain challenges to this approach:
  1. Bad Code (style, approach, architecture, performance etc). Almost any product that can run is shipped out the door to customers or clients. It may happen to have some small nifty hack or jury rigging and duct tape under the hood to keep it working. Such a product is volatile and may break upon alteration or up-gradation.

    Fix: A set of informal personal log should be provided to programmers/employees working on the project to document their contributions, potential problems, hacks applied and jury-rigging done with the project while they are still working on it. This log should be kept together with source code and documentation for better reference in the future.
  2. Obsolete Code primarily designed in archaic languages for ancient systems may clog up the archives with no further re-usability.

    Fix: Such projects should be carefully weeded out into another obsolete or dead code "cemetery repository". This may also require a special archivist with the dedicated duty of studying code, maintaining the archives and guiding other programmers with useful information.The archivist can be anybody from rookies to experts or even dedicated professional (will probably require a team due to the varying age of archived projects and diverse languages applied to it).

    Archived projects can also be made to reorganize themselves by timed automation.(For example a Project developed in a new popular language may be timed for a decade or two while perennial projects in C, Java etc can be set for five decades or so which may be extended upon inquiry from the archivist. I hope you too believe that the JVM will not be obsolete anytime soon nor will C.) Such obsolete projects may even be distributed as open source for education and experimentation purposes.
  3. Dirty Code is source code which is well, dirty. You know what I mean. The same old, lack of comments when needed, incorrect design, ambiguous functions and suspicious noise code (Don't know what that small method does? Not there in the documentation? Not mentioned in the programmer logs? Could be a logic bomb? Or, am I being paranoid?). Dirty code is unsafe to work with and providing global access to source code for any of your programmer anywhere on the planet with sufficient internet bandwidth can cause such dirt to accumulate.

    Fix:
    A proper access logging mechanism is required to observe who accessed the archives, when was the archive accessed, what was accessed in it and what was done with it? Also, a rule of forking existing repositories must be enforced to preserve original source code (which can be easily handled by any version control system worth its salt). Also, new recruits can be assigned to study and observe for such anomalies while cleaning such legacy systems.
  4. Cheat Code? Yes a repository or source code that is stolen from your archives under corporate espionage.
    Fix: Already discussed measures of access logging and version control systems which handle such problems.

 Wisdom of Wizards and Templates

The repetitive work can be easily identified with the help of a proper archiving system and such projects and problems should be streamlined with the help of incorporating Wizards and creating Templates or Stub generating programs. Also known as Code Generators. Such tools can accelerate software development exponentially. Want to build a social networking site every time? This might be your tool. But, careful thought should be made before applying such automation, as design flaws or hard coded errors could creep into new projects and will be difficult to track. Again, one must strive to abstract the mind work from the menial chore carefully. Custom requirements may require you to hand craft such solutions, sometimes, even from scratch. Don't be tempted to use this as a silver bullet.

Code Generators can also be scripts to code all the lines of the project as per observed design or pattern. Such, custom tools are generally one-off and built by the best programmers (who will also be of the laziest programmers - quoting Bill Gates).

Extended Archives

Companies can extend their archives to other companies as read-only or reusable resources. This can be done by levying some pay per view or annual rental/subscription charges. As the archive is categorized and with proper access rights and restrictions in place, will hopefully keep sensitive projects off limits. This can also help colleges and universities in exposing students to existing industrial endeavors.

Colleges can too build such repositories for student and teacher projects, examples, notes, resources etc. This can help in learning rapidly from existing source code and extending them further with new features.

Colleges may even extend such archives with collaborating with other colleges and industries. (Hey, you may even want to shift to GitHub.But, if certain features have to be specialized for students then good go build such repositories and archives.)

[Unfortunately in India almost every school and college dumps their students assignments and projects without a moments thought. While some teachers do retain some good projects but, is that enough?]

Points of Importance

Some points to keep in mind are;
  • Software should be developed like component assembly, where each set of features is provided by a certain package or component of code which can be either purchased (in case of Licensed), copied (in case of Open Source) or custom built. This makes extension, maintenance and reuse very efficient.
  • Programmer should learn and use clean coding style and follow proper coding conventions in order to keep their code legible and useful for others.
  • Style and standards can be enforced by companies to keep it easy for projects to be legible to other programmers outside the original developer team.
  • We should pause to think about our work. If its iterative without any requirement of creativity or customization then a proper approach should be taken to automate or simplify the task.
  • We should read more and research more while in the planing and design phase in order to optimize our approach and speed up the actual software coding process.
  • You may thank me for this blog post. I'll be super happy. ; ) If you have any other cool tips add them in the comments.

Resources for Further Reading:

Agile Software Development Methodology 

Must read books and inspiration (as well as resource) for this blog post
  •  The Developer's Code: What Real Programmers Do. By Ka Wai Cheung.
  • New Programmer’s Survival Manual. Navigate Your Workplace, Cube Farm, or Start up. By Josh Carter?

Project Souce Code sharing repositories and other version control systems

Monday, August 12, 2013

Experiments with The Epic Unreal Engine



I had played around with UDK for my minor project in Computer Science Engineering undergraduate course and had come into a new world of it's own. UDK or Unreal Development Kit is a professional game development kit built upon the Unreal (Game) Engine by Epic. It's a proprietary product but UDK is free for noncommercial use.

It was my first time playing around with a 3D graphics software and it took me a while to master it's various view-ports and other 3D graphics manipulations. It is very powerful tool for game development truly built for the "serious" gamer. Though I had to scrap the project due to it's multiple skill requirements in 3D Graphics (Game Level Design, Asset Creation), Story Boarding, Cinematography and Programming (If you're creating something truly original) and my small team.

A lot of core features are locked down into the source-code but, trust me, to build blockbuster games you would not require to peek under the hood. Well, as I've said before, until you're truly doing something not directly intended by the UDK or you're a professional game developer.

The programming can be done with UnrealScript (an object oriented language tied up with the Unreal Engine) while you may want to use C++ for programming in a licensed version. Another revolutionary alternative to programming game behaviors is to use Kismet, a visual scripting engine. Kismet is the prime tool used by new comers and graphic artists and game level designers to implement simple functionality like opening of a door or build a chain of events to perform sophisticated actions.

Another tool which must be used in parallel to the Unreal Development Kit is UnCodeX (A Source Code Browser for Unreal Engine libraries). It will be very useful to learn and experiment with the source-code unreal scripts to hack new cool in game features.

A lot of simple predefined source code and tools are provided to rapidly build a first person shooter while other genres may require to get under the hood or perform hacks. Hence, I built a simple FPS which showcases more of my Game Level Designing rather than coding prowess or any other cinematography skills.

Here's a list of Resources you can use to start tinkering with UDK:

Official Site-

http://www.unrealengine.com/ 


http://www.unrealengine.com/

Required Books-

Unreal Development Kit Game Programming with UnrealScript: Beginner's Guide

http://www.packtpub.com/unreal-development-kit-game-programming-with-unrealscript-beginners-guide/book


Mastering Unreal Technology: The Art of Level Design

http://www.amazon.com/Mastering-Unreal-Technology-Level-Design/dp/0672326922

You can get major help, tutorials on its excellent network and web communities. There are plenty of books too for your aid. Good Luck!

Here's my last major work with UDK;


https://docs.google.com/file/d/0B4e1TZA7mwrNLUIyRXVOQ2hXOUE/edit?usp=sharing

Note: You'll need the UDK to open the attached Map. I'm a little lazy and inept in using UDK, hence, no cooked files or executable.

Here are a few screen shots (Looks pretty good, eh?):






Disclaimer: The contents/Assets were prepackaged into the UDK. I did not import custom assets to the map.