The following syntax will list all lines in a file containing multiple keywords ‘println’ or ‘printStackTrace’ or ‘print’ in a file named “MyWork.java”
cat MyWork.java | grep ‘println\|printStackTrace\|print’
The following syntax will list all lines in a file containing multiple keywords ‘println’ or ‘printStackTrace’ or ‘print’ in a file named “MyWork.java”
cat MyWork.java | grep ‘println\|printStackTrace\|print’
See the status of the currently modified files as well as new files.
git status
Add all new files into git
git add -A
Verify that the files have been added
git status
Commit everything
git commit -a
To list the contents of a zip file use the following command:
unzip -vl a_zip_file.zip
To extract one single file from a zip file use the following command:
unzip -p a_zip_file.zip path/to/zipped/file.txt > file.txt
A bad programmer is somebody who I personally consider a liability to any team. This category of programmers have the potential to bring down a project and even a full team. It is always better to either notify them of their deficiencies so that they improve or to ultimately save the team by removing them. I tend to identify a bad programmer from their following traits:
Lack of curiosity
If a programmer is not curious about the API and considers superficial knowledge as sufficient then it is the first warning bell that this particular person will have a mediocre knowledge and as a result mediocre performance.
Difficult to Understand Code
If the code a programmer writes is bug laden and the code itself is messy and unnecessarily large then you are dealing with a bad programmer.
Lack of Depth in Knowledge
Superficial knowledge about a topic is a dangerous attribute of a bad programmer. This can bring less than optimized behavior in the software. This superficial knowledge can range from programming API, tools of trade and even the problem domain itself.
Unwillingness to do defensive coding
A programmer has to consider lots of scenarios which can be documented as test cases or even unit tests. If a programmer only considers a general scenario and fails to accommodate the not so general scenario then the result is often a bug laden software.
Unwillingness to comment or improve code
A commented source code is an asset and an un-commented source code is a liability. A programmer rarely works alone and if the source code written by them is not documented then it doubles up the amount of time required to fix their code. If a programmer never has time to comment the code or even simplify the code by writing smaller pieces of a large piece of code then this is a dead give away of a bad programmer.
Aversion to feedback
Any programmer worth his salt should be open to feedback from his peers. If a programmer is unfazed by negative feedback and doesn’t consider his responsibility to fix his code as a result of feedback then he is a bad programmer. A programmer should learn to make decisions based on experience and also the feedback received from peers and customers.
While trying to integrate Eclipse Forms into an existing Eclipse RCP application I encountered a launch issue where the launch failed with this error:
java.lang.RuntimeException: Application could not be found in the registry. The applications available are: org.eclipse.equinox.app.error.
Well the strange thing was I could do the relevant import of Eclipse Forms package in the Java editor while doing development but I got the above error while launching it. I thought it might be launch configuration issue so I went to Project Properties > Run/Debug Settgins > [Select Launch Configuration] > Edit. This opened up the Edit Configuration dialog where we have a Plugins tab. In the plugins tab sure enough the Eclipse Forms plugin was unchecked. I checked this check box for this plugin, saved the configuration and launched the application. This time no error happened.
By default Eclipse RCP didn’t tell me what the problem was. I spent some trying to guess the problem before finding the solution. The lesson from this experience is that we should always use “-debug” argument in the launch configuration as it clearly outputs on log any error which might not be properly reported via error dialog.
Here are some interesting articles I found from various sources.
Secure Login in AJAX Applications
Sizing Android Visual Elements Correctly
Adobe Woos Mobile Developers With Flash Builder 4.5 and Flex 4.5
Secure Login in AJAX Applications
11 Insider Tips You Must Follow If You Want Your App To Succeed
How To Create A Game Like Tiny Wings Part 1 Using Cocos2D
iOS 5 beta 3 released for Apple iPhone, iPad, iPod touch, Apple TV
I have known about Funambol for a while and it seems to be a very promising solution for the purpose of syncing data across diverse mobile platforms. Somehow I never really got down to use it in one of my projects so far. I have decided to check this solution in a test project in my spare time and get a feel of the overall solution myself. It has the correct vision of connecting everything ‘mobile’ via the cloud and I think this product has got a very promising future. I firmly believe that the future is a combination of mobile and cloud. A robust and diverse ecosystem of app driven mobile development market is going to be much larger than the traditional web and enterprise development.
In due course of development I came across a project which required me to extract thousands of file attachments from a MS Access 2010 file. This is a new feature of access and relatively less documented feature for which no third party tools are available to facilitate automated extraction of all the attachments. Manually extracting all the attachments was not an option so I started looking for programmatic ways to do it. Although I did find some ways by which I could use the native scripting of MS Access to extract all the files but I was not sure if it would work reliably. So I started looking for automated macro based solutions and I remembered using Jitbit Macro Recorder a couple of years back. This solution promised some hopes of allowing me to do what I wanted to do without throwing a new programming language in my way. So I went ahead and downloaded a new copy from Jitbit website. I was fairly impressed with the enhanced editor and macro recording facility. it took me very little time to record a reliable macro which could repetitively extract files from the MS Access file. Although the process was slow I was able to extract some files from MS Access without any problem. However the speed of extraction was very slow and I started to lose my patience. This is where Jitbit Macro Recorder again shined and I was able to locate the issue down to a number of unwanted delays which had crept into the recoded script due to my slow recording process. Using the inbuilt editor provided by this solution I finally removed almost 80% of the delays and then I was perceptively pleased at the faster rate of file extraction. After the final tweak the Jitbit Macro Recorder was able to extract files way faster than I could ever do manually. Overall at the end of the whole episode I was surprised that there were more than 3700 files extracted by this wonderful tool! It just worked quite reliably and didn’t crash or slowed down while dong this heavy duty operation which means the developers have done a very good job and have designed this solution for production use. There is no doubt in my mind that this tool is a very promising automation tool in my arsenal and I am going to keep using for quite sometime.
RIM’s Blackberry platform has proven the effectiveness of a good sync engine for syncing up user data like emails, contacts and calendars. Given the fact that it has a tremendous user base and fan following in the business culture also proves that it is highly effective for organizations who find it mandatory to at the cutting edge of all information related to the projects, finance and other important aspects of it business. Now it is clear that RIM has poured millions in the research and development of the Blackberry platform to make it stable and robust and hence it is known for its resilience. However what is the option for other developers who need the similar kind of sync engine for their development needs. Do they have to re-invent the wheel at all times to get the job done or there is some pre-built commercial and free libraries which can be used by them. I thing there is a genuine requirement in the market for coming up with a solution which will enable application developers and especially mobile developers to leverage the benefits of these libraries. I can definitely dare to imagine the flood of which will be possible if reliable sync engine is made available to the developers for every known platform. For example if there is a sync engine which lets the user sync data across iPhone, Blackberry, Android, Symbian and the Desktop platform then a developer can develop applications based on this sync engine to develop games, productivity app, media sync etc. A heavy duty multi platform agnostic sync engine is the need for the day for the development community. I personally would like to develop applications on it if such a library is available and does heavy duty platform agnostic sync.