Tag Archives: programming

Pune (Microsoft Technologies) User Group’s Developer Summit – Jan 16

What: Pune (Microsoft Technologies) User Group’s Developer Summit
When: Saturday, 16 January, 9:00am-5pm
Where: Dewang Mehta Auditorium, Persistent Systems Ltd., 402, Bhageerath, Senapati Bapat road. Update: venue changed to Ashwamedh hall, Erandwana Gaothan, off karve road, near nal stop, Pune
Registration and Fees: This event is free for all to attend. Register here (requires silverlight)

PUG is Pune's user group for Microsoft Technologies. Click on the logo to see all PuneTech articles related to PUG.
PUG is Pune's user group for Microsoft Technologies. Click on the logo to see all PuneTech articles related to PUG.

PUG Developer Summit

PUG Developer Summit 2010 is an event for developers to share, collaborate and meet up with like minded technology enthusiasts. to connect with industry gurus on all upcoming technologies like MOSS 2010, VS2010, Silverlight 4, WCF 4 along with first time in Pune a session on “Concept Visualization” by Sanjay Vyas…

Detailed Agenda:

9:00 to 9:30 Registration
9:30 to 10:45 Session I Concept Visualization Sanjay Vyas
10:45 to 11:00 Tea Break
11:00 to 12:15 Session II Visual Studio 2010 Farzin Faramarzi & Maheshkumar N
12:15 to 1:30 Session III MOSS 2010 Amol Vaidya
1:30 to 2:30 Lunch Break
2:30 to 3:45 Session IV Silverlight 4 Vikram Pendse
3:45 to 5:00 Session V WCF 4 Mahesh Sabanis

Conference report: The 4th IndicThreads conference on Java Technologies

(The IndicThreads conference on Java Technologies was held in Pune last weekend. This conference report by Dhananjay Nene was published on his must-read blog and is re-published here with permission. The slides used during the presentations can be downloaded from the conference website here and are also linked to in context in Dhananjay’s report below. In general, PuneTech is interested in publishing reports of tech events and conferences that happen in Pune, as long as they go into sufficient technical depth, and especially if links to slides are available. So please do get in touch with us if you have such a report to share.)

indicthreads logo smallThe annual indicthreads.com java technology conference is Pune’s best conference on matters related to Java technologies. I looked forward to attending the same and was not disappointed a bit. The last one was held about 3 days ago on Dec 11th and 12th, and this post reviews my experiences at the same.

As with any other conference usually something or the other isn’t quite working well in the morning, so I soon discovered we had a difficulty with the wireless network being swamped by the usage. There were some important downloads that needed to be completed, so my early morning was spent attempting to get these done .. which meant I missed most of Harshad Oak’s opening session on Java Today.

The next one i attended was Groovy & Grails as a modern scripting language for Web applications by Rohit Nayak. However I soon discovered that it (at least initially) seemed to be a small demo on how to build applications using grails. Since that was something I was familiar with, I moved to the alternative track in progress.

The one I switched to even as it was in progress was Java EE 6: Paving the path for the future by Arun Gupta. Arun had come down from Santa Clara to talk about the new Java EE6 spec and its implementation by Glassfish. Arun talked about a number of additional or changed features in Java EE6 in sufficient detail for anyone who got excited by them to go explore these in further detail. These included web fragments, web profile, EJB 3.1 lite, increased usage of annotations leading to web.xml now being optional, and a number of points on specific JSRs now a part of Java EE6. Some of the things that excited me more about Glassfish were, (a) OSGi modularisation and programmatic control of specific containers (eg Servlet, JRuby/Rails etc.), embeddability, lightweight monitoring. However the one that excited me the most was the support for hot deployment of web apps for development mode by allowing the IDEs to automatically notify the running web app which in turn automatically reloaded the modified classes (even as the sessions continued to be valid). The web app restart cycle in addition to the compile cycle was alway one of my biggest gripes with Java (second only to its verbosity) and that seemed to be going away.

I subsequently attended Getting started with Scala by Mushtaq Ahmed from Thoughtworks. Mushtaq is a business analyst and not a professional programmer, but has been keenly following the developments in Scala for a couple of years (and as I later learnt a bit with Clojure as well). Unlike a typical language capability survey, he talked only about using the language for specific use cases, a decision which I thought made the presentation extremely useful and interesting. The topics he picked up were (a) Functional Programming, (b) DSL building and (c) OOP only if time permitted. He started with an example of programming/modeling the Mars Rover movements and using functions and higher order functions to do the same. Looking back I think he spent lesser time on transitioning from the requirements into the code constructs and in terms of what he was specifically setting out to do in terms of higher order functions. However the demonstrated code was nevertheless interesting and showed some of the power of Scala when used to write primarily function oriented code. The next example he picked up was a Parking Lot attendant problem where he started with a Java code which was a typical implementation of the strategy pattern. He later took it through 7-8 alternative increasingly functional implementations using Scala. This one was much easier to understand and yet again demonstrated the power of Scala quite well in terms of functional programming. Onto DSLs, Mushtaq wrote a simple implementation of a “mywhile” which was a classical “while” loop as an example of using Scala for writing internal DSLs. Finally he demonstrated the awesome power of using the built in support for parser combinators for writing an external DSL, and also showed how a particular google code of summer problem could be solved using Scala (again for writing an external DSL). A very useful and thoroughly enjoyable talk. (Here is a link to the code used in this presentation. -PuneTech)

The brave speaker for the post lunch session was Rajeev Palanki who dealt both with overall IBM directions on Java and a little about MyDeveloperworks site. In his opinion he thought Java was now (post JDK 1.4) on the plateau of productivity after all the early hype and IBM now focused on Scaling up, Scaling down (making it easier to use at the lower end), Open Innovation (allow for more community driven innovation) and Real Time Java. He emphasised IBMs support to make Java more predictable for real time apps and stated that Java was now usable for Mission Critical applications referring to the fact that Java was now used in a USS Destroyer. He referred to IBMs focus on investing in Java Tooling that worked across different JRE implementations. Tools such as GCMV, MAT, and Java Diagnostic Collector. Finally he talked about the IBM MyDeveloperWorks site at one stage referring to it as the Facebook for Geeks.

The next session was Overview of Scala Based Lift Web Framework by Vikas Hazarati, Director, Technology at Xebia. Another thoroughly enjoyable session. Vikas dealt with a lot of aspects related to the Lift web framework including various aspects related to the mapper, the snippets, usage of actors for comet support etc. I was especially intrigued by Snippets which act as a bridge between the UI and the business logic have a separate abstraction for themselves in the framework and how the construct and functionality in that layer is treated so differently from other frameworks.

I subsequently attended Concurrency: Best Practices by Pramod Nagaraja who works on the IBM JRE and owns the java.nio packages (I think I heard him say owns). He talked about various aspects and best practices related to concurrency and one of the better aspects of the talk was how seemingly safe code can also end up being unsafe. However he finished his session well in time for me to quickly run over and attend the latter half of the next presentation.

Arun Gupta conducted the session Dynamic Languages & Web Frameworks in GlassFish which referred to the support for various non java environments in Glassfish including those for Grails/Groovy, Rails/JRuby, Django/Python et. al. The impression I got was Glassfish is being extremely serious about support for the non java applications as well and is dedicating substantial efforts to make Glassfish the preferred platform for such applications as well. Arun’s blog Miles to go … is most informative for a variety of topics related to Glassfish for both Java and non Java related aspects.

The last talk I attended during the day was Experiences of Fully Distributed Scrum between San Francisco and Gurgaon by Narinder Kumar, again from Xebia. Since a few in the audience were still not aware of agile methodologies (Gasp!), Narinder gave a high level overview of the same before proceeding down the specific set of challenges his team had faced in implementing scrum in a scenario where one team was based in Gurgaon, India and another in San Fransciso, US. To be explicit, he wasn’t describing the typical scrum of scrum approaches but was instead describing a mechanism wherein the entire set of distributed teams would be treated as a single team with a single backlog and common ownership. This required some adjustments such as a meeting where only one person from one of the locations and all from another would take part in a scrum meeting in situations where there were no overlapping working hours. There were a few other such adjustments to the process also described. The presentation ended with some strong metrics which represented how productivity was maintained even as the activities moved from a single location to a distributed model. Both during the presentation and subsequently Narinder described some impressive associations with senior Scrum visionaries and also some serious interest in their modified approach from some important companies. However one limitation I could think of the model was, that it was probably better geared to work where you had developers only in one of the two locations (offshoring). I perceived the model as a little difficult to work if developers were located across all locations (though that could end up being just my view).

The second day started with a Panel Discussion on the topic Turning the Corner between Arun Gupta, Rohit Nayak, Dhananjay Nene (thats yours truly) and moderated by Harshad Oak. It was essentially a discussion about how we saw some of the java and even many non java related technologies evolving over the next few years. I think suffice to say one of the strong agreements clearly was the arrival of Java the polyglot platform as compared to Java the language.

The next session was Developing, deploying and monitoring Java applications using Google App Engine by Narinder Kumar. A very useful session describing the characteristics, opportunities and challenges with using Google App Engine as the deployment platform for Java based applications. One of the take away from the sessions was that subject to specific constraints, it was possible to use GAE as the deployment platform without creating substantial lockins since many of the Java APIs were supported by GAE. However there are a few gotchas along the way in terms of specific constraints eg. using Joins etc.

I must confess at having been a little disappointed with Automating the JEE deployment process by Vikas Hazrati. He went to great depths in terms of what all considerations a typical J2EE deployment monitoring tool should take care of, and clearly demonstrated having spent a lot of time in thinking through many of the issues. However the complexities he started addressing started to get into realms which only a professional J2EE deployment tool writer would get into. That made the talk a little less interesting for me. Besides there was another interesting talk going on simultaneously which I was keen on attending as well.

The other talk I switched to half way was Create Appealing Cross-device Applications for Mobile Devices with Java ME and LWUIT by Biswajit Sarkar (who’s also written a book on the same topic). While keeping things simple, Biswajit explained the capabilities of Java ME. He also described LWUIT which allowed creation of largely similar UI across different mobile platforms. He explained that while the default Java ME used native rendering leading to differing look and feel across mobile handsets just like Java AWT, using LWUIT allowed for a Java Swing like approach where the rendering was performed by the LWUIT library (did he say around 300kb??) thus allowing for a more uniform look and feel. He also showed sample programs and how they worked using LWUIT.

Allahbaksh Asadullah then conducted the session on Implementing Search Functionality With Lucene & Solr, where he talked about the characteristics and usage of Lucene and Solr. It was very explicitly addressed at the very beginners to the topic (an audience I could readily identify myself with) and walked us through the various characteristics of search, the different abstractions, how these abstractions are modeled through the API and how some of these could be overridden to implement custom logic.

How Android is different from other systems – An exploration of the design decisions in Android by Navin Kabra was a session I skipped. However I had attended a similar session by him earlier so hopefully I did not miss much.

However Navin did contribute occasionally into the next session Java For Mobile Devices – Building a client application for the Android platform by Rohit Nayak. Rohit demonstrated an application he is working on along with a lot of the code that forms the application using Eclipse and the Android plugin. A useful insight into how an Android application is constructed.

As the event drew to a close, the prizes were announced including those for the Indicthreads Go Green initiative. A thoroughly enjoyable event, leaving me even more convinced to make sure to attend the next years session making it a third in a row.

(Comments on this post are closed. Please comment at the site of the original article.)

Pune Rails Meetup #1 – 21st May

Pune Rails LogoWhat: A get together for Pune’s Ruby on Rails enthusiasts
When: Thursday, 21st May, 8pm
Where: North Main Lounge, Koregaon Park
Registration and Fees: This event is free for all to attend. No registration required
Links: Follow @punerailsmeetup on twitter, Facebook Pagex

Details:
A meetup for all the developers in and around Pune working on ruby on rails – the coolest web technlogy available. A meetup to chill out together and talk! It is being organized for the first time to initiate and encourage interaction between the rails community in Pune!

Also: Check the Facebook Page for PuneRailsMeetup

Reblog this post [with Zemanta]

Geek Night @ Thoughtworks: IronPython, Ruby in C#, Distr. VCS – 4 April

thoughtworker logo, thoughtworksWhat: Geek Night at Thoughtworks. Three discussion – 1) IronPython 2) Writing Ruby like code in C# and 3) Distributed Version Control Systems
When: Saturday, 4th April, 2pm onwards
Where: Thoughtworks, GF-01 & MZ-01, Tower C, Panchshil Tech Park, Yerwada
Registration and Fees: This event is free for all to attend. Register here

Details:
The following 3 exhilarating talks are scheduled for this Geek Night.

1. Aroj George: “IronPython”

Aroj will take you through some cool ways you can use the power of Python in the .NET world. This talk includes a demo of embedding an IronPython engine in a .NET application to enable interactive exploration and dynamic behaviour.

2. Ravi Kumar Pasumarthy: “Why Ruby? You have C#”

Ravi’s talk is all about how to write Ruby-like code (short and less verbose) in C# without using dynamic language features. It also brings a new way of thinking about extending existing libraries to add new features. The presentation also covers topics like Extension Methods, Linq, Type inference, and Closures.

3. Shodhan Sheth and Nikhil Fernandes: “Distributed Version Control Systems”

This duo will talk about version control systems for distributed and disconnected teams. They help you think about, whether the version control system you are using is the “best tool for the job”?

Who To Contact: Pradip Hudekar at +91 9923000987

Write To: phudekar@thoughtworks.com

Reblog this post [with Zemanta]

Seminar: Strengths and weaknesses of various programming languages – 28th March

What: A presentation on the strengths and weaknesses of various programming languages, and how to choose one for your application, by Dhananjay Nene
When: Saturday, March 28th, 4pm
Where: SICSR – Symbiosis Institute of Computer Studies and Research – Map
Registration and Fees: This event is free for all. No registration required.

Details:
Confused about whether to use C/C++, or Java for your application? Or unsure of whether to go with Python, or Ruby, or PHP, or one of the many other “new” languages? Are you wondering whether it is worth the trouble to learn a hot new language?

Popularity of programming languages, or the number of jobs being offered for some programming language are not really good indicators by which to make your choice. It’s time to get some data on the fundamental technical differences between the major language groups today. It’s time to get some useful insights on the business implications your choice.

Dhananjay will discuss the relative merits and weaknesses of the major classes of modern programming languages and they reasons why you should choose one over the other for a specific application. He will cover both – technical issues in choosing a language, and business reasons.

This is targeted towards both – developers as well as managers who want to go past the religious debates over programming languages and want to be able to take decisions based on technical/business reasons as opposed to faith.

To get a primer for the material to be covered, check out the article Dhananjay wrote yesterday about how to improve your web based software development and maintenance ROI with dynamic programming languages

About the author – Dhananjay Nene

Dhananjay is a Software Engineer with around 17 years of experience in the field. He is passionate about software engineering, programming, design and architecture. He did his post graduation from Indian Institute of Management, Ahmedabad, and has been involved in Senior Management positions and has managed team sizes in excess of 120 persons. His tech blog, and twitter stream are a must read for anybody interested in programming languages or development methodologies. Those interested in the person behind the tech can check out his general blog, and personal twitter stream. For more details, check out Dhananjay’s PuneTech wiki profile.

Reblog this post [with Zemanta]

Improve your web based software development and maintenance ROI with dynamic programming languages

After we carried a few quick articles on why you should learn more about Ruby and Ruby on Rails (take 1, take 2) last month, we decided that we wanted to give people a much deeper article on why these new languages (Ruby, Python, PHP) and frameworks (Rails, Django) are setting the web world on fire. We invited Dhananjay Nene to write an article with an in depth discussion of the technical reasons how these new languages differ from the older ones and when to choose one over the other. He responded with this article which, as an added bonus, also includes the business reasons for your decisions. At the request of the community, Dhananjay is also giving a talk on the relative strengths and weaknesses of different programming languages on Saturday, 28th March, 4pm, at SICSR. All those who found this article interesting should definitely attend.

Introduction

Programing language selection is often a topic that elicits a lot of excitement, debate and often a bit of acrimony as well. There is no universally superior programming language that one can recommend, so I tend to generally disregard most language opinions which say ‘X language is the best’, without specifying the context under which it is superior. Finally most language debates often deal with the technical issues and not the ROI issues. Hopefully I shall be able to address this topic without being guilty of any of these problems.

So what languages are we referring to here ?

Official Ruby logo
Image via Wikipedia

The range of languages that fall under Dynamic Programming Languages category is rather extensive. My experience is primarily limited to Python and to a lesser extent PHP, Ruby, Javascript, and Groovy. For the rest of this article, I shall be primarily referring to Python or Ruby when I use the word dynamic languages, though many of the references may continue to be applicable and relevant for a number of other dynamic programming languages.

As I describe the technical characteristics, I shall also continue to attempt to address the business aspects as well, so you might find this article at a little techno-business level. Assuming I am able to excite their interest, the tech guys would not find sufficient technical details and would be hungry to hunt for more, and while the business guys would get a little teased with the possibilities, they will not quite get the ROI served in the traditionally formatted excel spreadsheets. Being aware of that, I continue down this path with a feeling that this perhaps will be the most appropriate level for me to abstract this article to.

Characteristics of Dynamic Programming Languages.

Let us quickly review some of the characteristics :

CPython
Image via Wikipedia

Object Oriented : Many dynamic languages support full object orientation. There are many who don’t necessarily buy the benefits of Object Orientation, but it is my strong belief, that once a piece of software grows beyond a certain threshold of complexity and / or size, Object Orientation starts delivering very strong dividends. There are a few areas such as highly complex, algorithmic processing which might be better suited for functional programming. However a majority of the medium-to-large sized web applications are better served by OO. The empirical evidence at least bears out the fact that most of the most popular languages today (except C) are Object Oriented. However this still is a very very large class of languages which in them include C++, Java, PHP, Python, Ruby etc. The one area where some dynamic languages separate themselves from the others is in the notion of “everything is an object”, ie. primitives such as numbers, functions are all objects by themselves.

Business implications: OO code well designed and implemented allows for a substantial reduction in maintenance costs. When working with a team which is up the curve on OO, it is likely to lead to lower costs and time on inital coding as well. On the other hand, both training costs and skill requirements are higher for fully OO languages. If you are already using partialy OO / hybrid languages such as PHP, C++ or Java, and are convinced about OO, using fully OO languages such as Python or Ruby will help you leverage the OO capabilities even further.

Duck Typing : In very loose terms, duck typed languages do not require you to declare an explicit interface. You send an object a message (ie. invoke a function or access an attribute) and if it can respond to it, it will, and if it can’t it will result in an error. Duck typing is a specific typing system which is a subset of a broader system called Dynamic Typing, which often makes for an interesting debate with its counterpart – Static typing : Static and Dynamic Type checking in practice. For people well grounded in static typing alone, this can sometimes seem to be sacrilegious. I am convinced that duck typing makes writing code much much faster for two reasons – a) You now require to write fewer lines of code and b) You often don’t have to keep on regularly waiting for the compiler to do its work. There is also a substantial capability enhancement that dynamic typing makes to the language type system, which allow the frameworks to build dynamic types on the fly. This in turn offers the framework users many more capabilities than frameworks written in other languages. That is why it is nearly impossible to write frameworks like Rails or Django in Java (You can modify the class loaders and use byte code generation to generate the new types, but the compiler can’t see them so you cant use them). That is also why there is a lot of anticipation of using JRuby, Jython and Grails on the JVM since the languages underlying them (Ruby, Python and Groovy respectively) bring the dynamic typing capabilities to the JVM platform.

Business Implications :Writing code is much much faster. Maintenance depending upon the situation can sometimes be more or less difficult in case of dynamic typed languages. Refactoring is usually a lot more difficult in case of dynamically typed languages since the underlying type system is not able to infer sufficiently about the code to help the refactoring tools, as is possible in case of statically typed languages. It is my opinion that a skilled and trained development team using dynamic languages can generally substantially outperform another equally capable team using static languages. Insufficiently or poorly skilled development teams however can lead to very very different kind of pitfalls in these class of languages. In both cases the code becomes difficult to change or maintain due to a) cryptic code in case of dynamically typed languages and b) extremely large code bases in case of statically typed languages. Both are undesirable situations to be in but if I had to choose between one of the two, I would go for being in the cryptic mess since it is at least manageable by bringing in external skilled help.

Metaprogramming : Metaprogramming is in loose terms the ability of programs to write programs. A large proportion of developers may not use this capability too frequently. Specifically in web application development it gets used as a mechanism to transform one set of datastructures which a programmer specifies into code at runtime. As I point out later in this article, it in fact is a very important element in designing common frameworks and libraries which in turn offer substantial capabilities including small code and easier maintenance. A quick note to state that metaprogramming is not code generation. In case of code generation, one uses the generator to generate code which is then compiled. A big limitation with this is the fact that often people modify the generated code leading to really tough maintenance nightmares and the fact that it is a two stage process which is prone to more errors. Metaprogramming results in new code “coming to life” so to speak while your program is running.

Business Implications : Read on, they will get covered in the final roundup. They are large and they are positive.

Function blocks/objects, iterators, closures, continuations, generators: I will not go into any substantial details of this issue except to say that small pieces of code logic can be handled in a much much more concise way than if these weren’t supported. While many situations may not need closures support, you will be glad to have them on your side when needed.

Business Implications : Helps having shorter, cleaner code leading to lesser development and maintenance costs. Another significant positive is that your developers are just likely to be so much happier since they get some truly nice building blocks for concise and elegant expression of their logic. Can’t think of any significant negatives.

There are a full range of other capabilities, but none come to mind immediately as something that have strong business implications as well.

The role of frameworks

Ruby on Rails
Image via Wikipedia

When did these languages say Ruby and Python originate ? Most people are likely to be a little surprised if the answer is in the last millenium. Yet Guido von Rossum started working on Python in 1986 and Ruby was released in 1992. Python has been rather well known within the scientific community and perhaps a bit within the systems / OS utility programming communities for quite some time. However both languages grabbed a large mindshare only post 2005. A big reason for their popularity (especially in case of Ruby’s case) came from the popularity the frameworks which used them. Ruby on Rails for ruby and Django (to the best of my knowledge) for python. These frameworks combined the language capabilities with the learnings of good design practices for internet applications (eg MVC, declarative validations, simple ORM etc) into a simple usable package, which developers could take and build web applications quickly. There are examples of people having built simple web apps within a day and medium complexity apps in 1-3 weeks using these frameworks. The languages are the ingredients, the frameworks are the cooks – a great combination for serving great meals. Now you will find many such frameworks in these languages, including some which have better capabilities for building more sophisticated / complex applications eg. Merb and Pylons.

I am not too sure of how many people are exactly aware of the role of metaprogramming in the frameworks’ successes. I am willing to believe that but for metaprogramming, these frameworks simply would not have achieved anywhere close to the success they achieved. It is metaprogramming which takes the datastructures as defined by a developer and converts it into runtime code implicitly, saving the developer lots of time and effort. So even if most developers don’t actively write metaprograms, their lives are so much easier. Metaprogramming capabilities are also the reason why it is virtually impossible to write similar frameworks in Java. However if you are on the .NET or JVM environments, things are definitely looking encouraging with the possibilities to use IronPython or IronRuby on .NET or JRuby or Jython or Groovy+Grails on the JVM.

Business implications : If you are focused on scientific or desktop or highly algorithmic applications, where python especially is used extensively, you are likely to get benefits from these languages on their own merit alone. For web applications you will see the maximum benefits by using the web MVC frameworks along with the languages. I submit that on the whole you are likely to see very substantial reduction in development, enhancement and maintenance times – sweet music for any end user, investor or project manager.

Increased Business Agility

There is one more reason why I believe these languages are especially helpful. They help by increasing development agility to an extent where it now allows for the business to be more agile. You can get a first prototype version up in weeks, take it around to potential users, and gather feedback on the same. Incorporate elements of this feedback into the next release of working code quickly. The business benefits of such a scenario are tremendous. You might wonder that this is a process issue, so what does it have to do with a language selection. I would submit, that languages which allow changes to be made faster, help support this process in a far superior way. Another equally important facet is the superior risk management. Since you are able to build features with lower investments, you are able to get a series of customer feedbacks into your decision making process much faster. This helps being able to come up with a product that really meets the customer expectations much earlier. This happens by allowing the better features to come in earlier and also by allowing the lesser important or lesser relevant features to be decided to be deferred earlier. That’s precisely the reason why the dynamic languages have found a strong acceptance in the startup world. I believe the increasing agility which is often required in the startup world, is and will continue to be increasingly required of established enterprises. Precisely the reason why I believe these languages will continue to do better in the enterprise space as well. Finally, these languages make it relatively easier to tell your business sponsor – We will work with you on imprecise requirements rather than spending months on nailing down requirements which anyways are likely to change later. This has both a pro and a con especially for outsourcing situations. It is likely to allow for tremendous customer delight in terms of a vendor that works with him in such a flexible manner, yet it does introduce challenges in terms of how the commercials and management of the project are handled.

The reason I would like to especially point out increased business agility is because programmers don’t often visualise or evangelise it much, but when I wear a manager’s hat, it is perhaps the most compelling benefit of these languages.

Concluding

As I said earlier, there is no single universal language which is the best for all scenarios. There are some scenarios where using dynamic languages will not be helpful

Programming language book sales 4Q2008

A Treemap view of sales of programming language books by O’Reilly Media in 4Q2008. The size of a box represents the total sales of a book. The color represents the increase or decrease in sales compared to same quarter in 2007. Green = increase, bright green = big increase, red = decrease, bright red = large decrease. See full article at O’Reilly Radar for lots of interesting details.

When not to use these languages

  • You are building a simple / small application and don’t have the available skill sets. One exception to this is where you decide to use it in a simple application to allow yourself a non risky mechanism of building these skillsets.
  • Extremely High performance requirements. However please make sure that you really need the high performance capabilities of say a C, C++ or Java. In my experience 80% of developers like to believe that they are building highly performant applications where the maximum speed is a must have. Yet the top 10% of them are facing far far more critical performance requirements than the remainder. Unless you are convinced you are in the top 10%, you should certainly consider dynamic languages as an option. Moreover in case of most high performance requirements, these can sometimes be boiled down to a few inner loops / algorithms. Consider implementing the same in C, / Java or other .NET languages (depending upon the choice of your dynamic language interpreter implementation)
  • You have an architecture standard in place which does not allow using these languages. If you are convinced your applications are better served by using dynamic languages both from your individual application and an overall enterprise perspective, consider taking the feedback to your standards setting body to see if you can pilot a different approach. Also evaluate if the .NET or JVM versions can help you comply with the architecture guidelines.
  • You are unable to commit to the retraining requirements. While these languages are easy and powerful to use, leveraging that power can require some amount of retraining. If that does not fit your business plans, since the retraining effort could impact immediate and urgent requirements, that could be a reason to not use these languages. However in such situations do consider investing in building this skill sets before you get to another similar decision point.
  • You need a very high levels of multithreadinging as opposed to multi processing support. While this is not a typical situation for web applications, you should be aware that most dynamic languages have some limitations in terms of multi threading support. This actually is not necessarily an issue with the language as with the implementation eg. the C implementation of python has the notorious Global Interpreter Lock which constrains you from being able to use more than a handful of threads per processes efficiently. However the same restriction is not present in Jython (the jvm implementation of python). This is likely to be an issue for a miniscule percentage of the web applications market for the primary reason that multi process / shared nothing architecture styles often work quite well for many web applications and they don’t really need multi threading.

So where’s my return on investment ?

First of all lets talk of the investment part. If you get into it in a paced approach, the investment may not be that great. Start with a team size of anywhere between 2-6 people (depending upon your organisation and project size). Think of 15 days of intensive training followed by a 2-6 months coming up the curve effort (more likely 2 than 6). Make sure your first project is not a critical one under tremendous business pressure. This can be subsequently followed by more people getting retrained as necessary. In the longer term it might actually help reduce your incremental investment, since it might be much easier to ramp up new programmers in Ruby or Python than say Java or C#.

Secondly lets look at the incrementally higher costs. You are likely to need people who are a little bit more capable in terms of understanding and debugging the same logic expressed in fewer lines of code (that sometimes can be a challenge) and then be able to modify and enhance the same. This may increase your testing and fixing costs in the earlier days. Finally while the fewer lines of code can make refactoring easier, you could find that your total refactoring costs are a little higher.

Now the returns part. I am convinced that the increased business agility is the strongest return in business terms. Immediately after that is the substantial reduction in development, enhancement and maintenance times. If neither of these benefits are appealing, when contrasted with some other issues that you might perceive, maybe considering dynamic languages in your context is not such a great idea.

One more factor that I would of course encourage you to evaluate from a business perspective are the implications for you if your competition (assuming it is not already using them) started using these languages. The implications would vary from case to case, but it could also help you decide how important this issue is for you.

About the author – Dhananjay Nene

Dhananjay is a Software Engineer with around 17 years of experience in the field. He is passionate about software engineering, programming, design and architecture. He did his post graduation from Indian Institute of Management, Ahmedabad, and has been involved in Senior Management positions and has managed team sizes in excess of 120 persons. His tech blog, and twitter stream are a must read for anybody interested in programming languages or development methodologies. Those interested in the person behind the tech can check out his general blog, and personal twitter stream. For more details, check out Dhananjay’s PuneTech wiki profile.

Reblog this post [with Zemanta]

Why Ruby is cool – take 2

Official Ruby logo
Image via Wikipedia

Earlier today, we had an article by Nick Adams on why you need to learn Ruby and Ruby-on-Rails. That post attracted a detailed comment by  Ravindra Jaju which elaborated on some of the themes touched upon in the original article. Since it brings out nicely the power of Ruby, we decided to post the comment as a new article to ensure it reaches all the readers who don’t necessarily read the comments. (By the way, you should subscribe to PuneTech comments by email or via RSS.)

Those interested in Ruby should check out Ruby Fun Day in Pune on Saturday, 21st February. If you want to learn Ruby, take a look at RubyLearning.org, a site that provides free, online courses for Ruby, by Pune’s own Satish Talim. Also check out the Pune Ruby mailing list, which is reasonably active.

This “article” only makes sense in the context of the original article, so ensure that you’ve read it before you read this:

Depending on where you come from, the syntax 5.times… may appear either beautiful or plain weird. But whatever the initial impression, one starts appreciating it as the power unfolds. The syntax ‘5.times’ might look like something completely out of the blue at first glance, but once one recognizes that 5 (or any number for that matter) is a first-class object, things start falling in place.

Try playing with this further using ‘irb’ (the ‘interactive ruby’ command-line tool which is a part of the ruby distribution) to explore the object ‘5? further as follows: 5.class, 5.methods, 5.methods.sort [send message ‘methods’ to 5, which returns an ‘Array’ – further send a message ‘sort’ to this returned Array object if you like to see the methods ordered]. And if you haven’t guessed this already, do note that brackets to function calls are absolutely optional if the syntax is unambiguous (so, the above is equivalent to

5.times(){puts “Hello Pune!”}

which is equivalent to

5.times(){puts(”Hello Pune!”)}

What comes within the braces ({}) after ‘5.times’ is a block – ‘5.times’ is by itself uninteresting, unless you can do something 5 times, no? Blocks are a very powerful concept, which are defined at one place but executed elsewhere. They have access to the context where they are defined (closures). Use of blocks (and associated Proc objects) can lead to very interesting, succinct code!

And again, if you are a C/C++ or a Java programmer feeling wary about jumping into something new and have that feeling of your uber-cool libraries not being accessible from Ruby (and hence a new learning curve apart from the heart-burn) – fear not! Ruby, being an interpreted language, runs in a VM of its own. And the Ruby VM developers have made sure that access to your favourite libraries is as easy as possible. The ‘official’ Ruby VM is C code, but obviously the cool thing that the JVM is, you can run Ruby inside the JVM (Java Virtual Machine) too. Many have already made these libraries accessible via Ruby. I would term the Java VM as more powerful in this regard, giving you access to native libraries apart from all the Java goodies (look up ‘ruby+ffi’ on yahoo/google search).

Then again, metaprogramming takes Ruby fun to newer heights. Rails wouldn’t have been (easily) possible had it not been for Ruby’s abilities in this regard. How would you feel if told that there are database access methods named (for example) ‘find_by_name’ or ‘find_by_name_city’ that aren’t defined anywhere but still create appropriate SQL calls (’where name = …’ or ‘where name = … and city = …’) because you can intercept ‘function undefined’ events, look at the function name and arguments, and create the right SQL on the fly? Or even before that, a class mapped to a database table ‘knows’ which table it is supposed to represent in an object form, just by looking at its *own* name? The good news is that all the cool libraries developed as part of the Rails initiative can be used in plain Ruby code without all the rails framework overhead too.

Well, enough said for a comment. You’ve got to experience it to believe it!

(PS: Not saying here that Ruby is unique – Python, for example, is cool too – but a Python-junkie would be a better marketeer for it 😉 )

Reblog this post [with Zemanta]

Why you need to learn Ruby and Rails

Official Ruby logo
Image via Wikipedia

With increasing visibility for the Ruby programming language, and the passion that people show for Ruby-on-Rails for web development, we felt that we would like to delve a little into what makes Ruby so cool and Rails so hot. Especially, in light of the fact that Ruby Fun Day is happening in Pune on Saturday, we wanted to give our readers a feel for why the should consider attending Ruby Fun Day. With that in mind, we invited Nick Adams of Entrip and SapnaSolutions (both those companies use Ruby-on-Rails as a cornerstone of their offerings), to tell us why Ruby and why Rails.

Ruby is an interpreted language like Python, Php, Perl, and a whole host of other popular Unix based languages. It was invented in 1992 by a Japanese man. However it only shot to fame in the last few years when the web development world started getting very excited about a new framework called ‘Ruby on Rails’, which arrived in 2005. But I’m getting ahead of myself. First, I’ll look at Ruby in its own right. Then, we’ll take a look at Rails and what’s cool about it.
The first thing you’ll notice about Ruby is it’s beautifully easy syntax:
5.times { print "Hello Pune!" } 
Goodbye to semi colons, variable declaration, etc it makes for readable code while ensuring you don’t spend more time than you need with coding. Ruby is 100% object oriented, in fact, everything in ruby including variables, are objects. That can be a little overwhelming at first, but it begins to make sense as you use a framework like rails and really reveals its true power when you want to change or add to the core ‘String’ class, on the fly. It means, in basic speak, that Ruby is very flexible. But there is more. Ruby has cool features like blocks, iterators, and a wealth of all the expected higher level language features like ‘capitalize’ and ‘reverse’ methods for strings.
Ruby on Rails
Image via Wikipedia

Rails is of course a web development framework. It is important not to see Rails as simply a collection of new classes and methods designed to aid web development. There are two things that I believe are important to understand before you dive into Rails. One is the MVC pattern of design. The MVC pattern of system design separates application logic into distinct parts making development fast, but also scalable and logical. The second is the rails conventions. Although sometimes ambiguous and debated, sticking to the basic rails conventions and understanding how the framework is designed to work will greatly aid collaboration, and futureproofing of your app.

What’s so cool about Rails? I recently interviewed someone who has worked in Java, Php and Rails for web development. I could sense the passion in him to work for a company that specialises in Rails, and didn’t need to explain why. If you have ever built a web application in .net, java, or php, you’ll really appreciate the power of Rails. It’s fast, modular, and working in Ruby is fun because you create clean, readable code. It’s free. Ajax and Web 2.0 style features are easy. Fully unit testing your app is easy. Roll out new ideas in weeks instead of months. Setup is easy, in any environment, but being open source it favours ‘nix based environments like Linux and Mac.
It all sounds great, doesn’t it? I would advise, however, that Rails is best understood by those who have understanding of the web and building database driven web applications already. Rails is a framework built on long standing notions, it’s not a magical new web development language. It makes what exists already, much easier and faster. Understand the Web. Understand Web Applications. Understand MVC. Then learn Rails, and you’ll never look back!

About the Author – Nick Adams

Nick Adams is the co-founder of Entrip, an integrated travel utility that gives a map-based interface to plan your trip, capture your experiences in multimedia, and share them with friends. SapnaSolutions is the Ruby on Rails Development company behind EnTrip. They make Web Apps for clients and develop in house products. He can be reached at nick [at] entrip [dot] com
Reblog this post [with Zemanta]

Open-source Code Camp last weekend – A report

The Pune Linux Users Group (PLUG) had organized a code camp on Saturday, with the intention of getting a bunch of developers to get together and develop code, talk about code, answer each others’ coding questions on specific coding projects.

Aditya Godbole one of the PLUG members who attended, posted this overview of the event at the PLUG mailing list:

The following work was successfully done at the Code Camp –

  1. Abhijit Bhopatkar – Added some functionality to TeamGit. He was very excited about it and shot off a long mail to the list as soon as he finished it, so I’m not going to spend any more words on that. Refer to his earlier mail on the list.
  2. Guntapalli Karunakar – Started on something, but ended up spending most of the time in critical maintenance tasks of the Indlinux server!
  3. Ashish Bhujbal and Amit Karpe – Worked on an HCL prototype notebook. Tried to resolve some issues with the X display rotation and calibration of the touchscreen. Solved both issues. Were trying to finish solving a problem with hibernation before going into hibernation themselves.
  4. Aditya Godbole – Fixed 3 bugs in the lush-opencv package and added a utility function. One of the fix is already in the upstream cvs.

Of course, along with all this, we had a blast (which was the primary motive anyway).

Thanks to Manjusha for doing a bit of running around for organisation (in return for which we configured her ssh server 🙂 ). Thanks to Sudhanwa and Shantanoo for hanging around to give us company.

Abhijit Bhopatkar, whose work is mentioned in point #1 above, posted details of teamGit:

teamGit is a functional git gui written in qt, its ultimate aim is to add functionality
on top of git targeted at small closely nit teams.

After a succesfull codecamp session, I have tagged the repo with v0.0.8!!! You can now get the .deb from ubuntu intrepid ppa deb http://ppa.launchpad.net/bain-devslashzero/ubuntu. intrepid main
package name is teamgit.

The main project website is http://www.devslashzero.com/teamgit

There are many small changes and feature adds you can take a look at repo here: http://gitorious.org/projects/teamgit/repos/mainline

The major feature add however is addition on **Advanced** menu.

This menu is constructed on the fly parsing output of ‘git help –all’ Then when you click on a menu item it issues git help , parses the manpage and presents its options in a guified form. It even display nice tooltips describing the option.

This is just a first stage of the planned feature. Ultimately this advanced menu will be just a ‘Admin’ feature. People will be able to save the selected options and parameters as ‘Receipies’ and can cook a nice receipes package particular to their needs/organisations.

The feature is not really complete yet, but you can issue simple commands using it. There _are_bugs_ but i couldn’t wait to showcase this nifty feature.

Check out the screenshot http://www.devslashzero.com/images/teamgitscreenshots/screenshot-teamgit22nov.png

Photos of the event have been posted on flickr (thanks G Karunakar).

PLUG also holds monthly meetings on the first saturday of every month from 4pm to 6pm at SICSR. You can keep track of these and other tech events in Pune by following the PuneTech calendar, or by generally subscribing to the PuneTech feed.

Code Camp – A hackfest organized by PLUG

What: A two-day hackathon, with (possibly) a focus on developing open-source and/or linux software
When: From 22 November 9am to 23 November 10am (overnight!)
Venue: Bhaskaracharya Prathishthan
Registration and Fees: This event is free and open to all. No registration required

Details

Code Camp is a 24-hour hackfest organized by the Pune Linux Users Group (PLUG). The idea is for a bunch of developers to get together and develop code, talk about code, answer each others’ coding questions on specific coding projects.

Code Camp is a new type of community event where developers learn from fellow developers. All are welcome to attend and speak. Code Camps have been wildly successful, and this one is  going to bring that success to Pune.

The Code Camp Manifesto consists of six points:

  • by and for the developer community
  • always free
  • community developed material
  • no fluff – only code
  • community ownership
  • never occur during working hours
Here are more details about Code Camp Pune in the words of one of the organizers:
Over the past 2 weeks a few of us have been working in the background to get things moving for the code camp. Initially we had decided to restrict the number of problem statements to 2. However we felt that by doing so we might end up keeping away quite a few potential participants. Hence we have decided to allow any number of problem statements to be tackled, as long as it is a serious effort.

There also seems to be a misconception that this is some sort of an ‘event’ that is being ‘managed’ by ‘PLUG’. Quite like the misconception the the ‘Government’ is responsible for running the ‘country’. This is not going to be an event where a few people will swoop down from different places and give you some gyan. This is an event where you, in your individual capacity, have to make things happen. This event is for you to get together with a few like-minded and come up with something constructive. The ‘organisers’ will just provide a few facilities and try their best to keep things from getting in the way of your main task. Things like creating a wiki to enable you to discuss. The wiki is at http://www.plug.org.in/wiki. You can follow the ‘Code camp’ link and see whether you find anything interesting. If you don’t find anything interesting, but have something interesting to propose to others, and have the drive to take it to the end, then you can add it to the wiki.

So, here are a few facts:

  • The Venue is confirmed: Bhaskaracharya Prathishthan
  • Dates: 22nd November 0900 hrs to 23rd November 1000 hrs.
  • Provision for overnight stay for at least 12 people has been confirmed (if you wish to hack away through the night)

Also, its improbable that you think of something a couple of days prior to the event and successfully finish it on the day. Generally a lot of groundwork is needed to even freeze on a good problem definition. I would suggest that anyone who is interested should start now. Start discussing on the wiki, start exploring, and start coding now. The idea is that on 23rd November we have something substantial, usable and useful to show. i wonder whether the ‘community’ is capable of doing that.