Haven't posted anything for quite long. That is sad, but I've had very tense time at work with a couple of new projects. Working quite hard with Python and Reportlab right now and have Java/Groovy and Grails project as long-term task. Would say I am happy right now about this tough schedule which helps me to gain new knowledge ;)
Despite of my schedule I've found some time at home and have finished my personal web-page. I've decided to make a tiny portal about myself and consolidate all links and all information about myself in one place. Here it is: [konakov.info]. This blog is published on that site via atom feed.
Would like to add that Python and Django inspired me so much, that I've created my page using them. And this page is hosted on Google App Engine. Those technologies are great!
Hope to see ya soon again ;)
9/29/2011
4/25/2011
Bash exercises
At work we have some legacy, proprietary, in-house built HTML Template System for web-page generation. This solution looks reasonable and solves the tasks it was written for. But it causes one small problem to me, as to Developer/User of this System. It has no Source Version Control Tool "beyond". Just two servers. One for development/testing and the other for production. All source code is located just in folders on both Servers. And there are scripts to sync folders between Servers.
That evolves a bunch of problems (according to my restless mind):
1) Process demands to make backups before you upload changes on dev/test Server. You can change Template directly on Server, but anyway you need a backup.
2) You have to ask your colleagues if somebody works on some ticket for this System or not. Just to eliminate possible collisions.
3) It is quite boring and hard to remember all files you've changed locally. Just not to forget to upload them on Server.
I decided to write a couple of scripts using Bash, Scp and Git to make my life quite easy. The Idea is quite simple:
a) You provide to the script the ticket number, Server-Doc-Base and Template folder for download. The script creates local folder with name of the ticket number, copy all files from Template folder on Server to your local machine and commit everything in Git. Using aliases and functions in .bashrc you can define a bunch of "shortcuts" and eliminate the second parameter (Server-Doc-Base) for your scripts. This parameter is changed quite rarely and we can fix it.
b) The whole magic, actually, will be done by Git. After we change a few files and want to test our changes, we just ask Git about local changes, check those files on Server (they should not be changed while we were working on them) and upload them with final commit to local Git.
That is it. Git allows you to do many very interesting things, this is why I like it.
But actually I would like to mention a small issue I encountered during work with Bash. Unfortunately, this code:
COUNTER=0 git status | while read LINEdo ((COUNTER++)) echo $COUNTER done echo $COUNTERwill work not as you would expect it. The last counter value will be ZERO! I had spent quite long time before I understood what was going on and found this very helpful post.But anyway, Bash is a powerful tool, use it, like it, and it will help you to make your daily routine much easy.4/19/2011
Python + Lambda
I was in the middle of search some quick "How-To" question when encountered this SOF post.
Such small examples of FP as Lambda for "map" or "filter" collection functions I use almost every day. Used to work with them in Java (google-collection, apache collections) and definitely use it in Python. When I see some iteration using "for" or "while" for some collection only for filter it makes me nervous :)
Didn't think that for someone it may looks like "obscurity". Can't say I got FP so deep. Sometimes it is challenging for me to get idea from FP-style code, but such small things in daily use I find elegant and robust.
4/08/2011
Python + Django
I am sitting at work, playing with Django run through pdb (Python debugger).
Don't know why I like it so much ;)
Don't know why I like it so much ;)
4/07/2011
Google Desktop
I've discovered for myself the "Google Desktop". Not in terms of search, I haven't used this feature too much.
But in terms of gadgets on toolbox. Using "ToDo List", "Gmail" and "Google Documents". Looks convenient.
4/06/2011
Petclinic
A friend of mine asked me a few weeks ago about a good project to refresh his J2EE knowledge. I had a quick thought and decided that the "petclinic" demo-app from Spring Framework should be quite good.
A couple of weeks later I decided to have a look at this demo-app myself and was a little bit confused. I remember that this application was a part of Spring Framework distro - but not anymore. Now you can get it on your local computer using SVN repo which is quite tricky to find, first of all. The second disappointment was that this application is quite hard to deploy-and-run.
I have quite good exp. dealing with J2EE but it took some time to setup this app for quick deploy/run scheme in Eclipse. And finally I decided it may be useful for someone to have such "out of the box" application. I decided to try and use GitHub and publish the end result of my experiments there. At least my friend will be able to get it, import in Eclipse and run. It may ease the start of his refreshment in the J2EE world.
So, using this link "git@github.com:denkonakov/petclinic.git" you can pull "petclinic" demo-app on your computer, just import it in Eclipse, add this application to your Tomcat Server in Eclipse Server Plugin and start using it.
Enjoy!
Subscribe to:
Posts (Atom)