Posts

Showing posts from March, 2014

Packing and Obfuscating Javascript Files, and also Deobfuscation

I personally wrote a thesis about Java obfuscation. Really. Anyway, this post would talk about Javascript file packing. There are several benefits of doing the packing process : Minimizing the javascript file size, therefore speeding up the website download time for users using mobile device and less-than-3G bandwidths Obfuscating the content of the javascript file, keeping unwanted eyes or parties (such as your client) from reading your source code. You might have spend much time and effort writing them so you don't want anyone to easily copy and modify your works. But in some organization, like where I worked, needed to change the source code now and then. Normally we include a contract clause such as these "full source code of the application built must be given to the company that paid for the programming work". But sometimes we forgot to state the clause, or we might forgot to remind the programmer about the clause, leaving us without the original source code

Maven Hell Again and Again

Image
Something is wrong with Maven. Really. Even though no-1 problem of smooth maven operation in my country is no longer an issue (the no 1 problem is low bandwidth internet connectivity, this no longer an issue since my office's bandwidth has been upgraded tremendously), other issues still plague my maven operation today. See, I have this one production java application, built using Spring Roo (a good technology choice at the moment) and each time the source code changes I am forced to waste time repairing my maven configuration. The problem is a failed dependency resolution that took a long time to investigate. One of the previous big time-waster when I am using maven is the problematic Maven-Eclipse integration. I avoid Eclipse now, currently I am using IntelliJ's IDEA Community edition. The error is something like : At first I was confused that the problem is about stale local repository cache, which I tried to fix using mvn -U switch. Because it does no good, I

Practicing for the Google Code Jam - Milkshake

I'm trying to practice for the Google Code Jam. In particular, I want to blog about the Milkshake problem (Round 1A 2008). The problem definition could be read here . My idea is to do a dijkstra graph search algorithm to expand sorted nodes. The node consists of : a state array of the milkshake preparation, * stands for undecided, 0 stands for unmalted, and 1 stands for malted. satisfied customer count satisfied customer boolean array A customer is said to be satisfied if one of the decided preparation contains one of his/her milkshake flavor preference. The nodes were sorted first by malted flavor count, and then by satisfied customer count. In Dijkstra's terms, we are doing graph traversal on the nodes minimizing cost, whereas the cost is defined as the malted flavor count, and the destination is defined as the condition where all customers are satisfied. The new nodes are defined as a new state where one of the customer's flavors are satisfied. We skip satisfie

Invoking SAP ABAP Web Service

Sometimes we need to call function modules in SAP using Web Service techniques instead of plain RFC. For example, using PHP platform, we might want to avoid installing saprfc extension, and in .NET platform, we might want to avoid NetCo (SAP .NET Connector). It seems that calling SAP Web Services have several pitfalls. This post would inform you, the reader, so you would not make the same mistake as I did. Ensure the Web Service is configured with authentication At minimum, the web service must be invoked with SAP user id  and password. This means in two sides : the SAP web service must be prepared to receive SAP user id & password, and the calling client (.NET framework, for example) must send appropriate authentication headers (in my case, Basic authentication). For the first part, set the Authentication Method/ Transport Channel Authentication in transaction SOAMANAGER to require username/password. See http://scn.sap.com/docs/DOC-38805 for a screenshot. Failing to do so m