We have an internal Jabber server at work, which is great for communication. However unlike HipChat/Campfire - it lacks central logging.
A couple of hours with sleekxmpp, Whoosh and flask solved the problem. logbot is out there - use with caution. (And pull requests are more than welcome ;)
If it won't be simple, it simply won't be. [Hire me, source code] by Miki Tebeka, CEO, 353Solutions
Sunday, September 29, 2013
Saturday, September 21, 2013
JSON Handling with datetime Support
While working on some ETL testing code, we needed to load some synthetic data to a database. At first we thought of using YAML for the synthetic data, but it was very slow so we decided to switch to JSON which is still readable but way faster (loading 183 records took 0.68sec with YAML vs 0.008sec in JSON).
However we needed support for serializing datetime objects. Here's dtjson, which support datetime objects in JSON serialization. You can use it almost a drop-in replacement for json: import dtjson as json.
However we needed support for serializing datetime objects. Here's dtjson, which support datetime objects in JSON serialization. You can use it almost a drop-in replacement for json: import dtjson as json.
Wednesday, September 18, 2013
Adding ODBC Source on OSX
At work, we're using Netezza as our main data warehouse. It took me a while to figure out how to add the ODBC driver on OSX so that I'll be able to connect with pyodbc.
Here are the steps:
Here's a small example usage:
Here are the steps:
- Get the OSX Netezza ODBC driver and unpack it
- Not sure where do get it, we have it internally
- Extract the archive somewhere (say /opt/NetezzaODBCDriver)
- Add export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}":/opt/NetezzaODBCDriver/lib/ to your ~/.zshrc (or ~/.bashrc)
- mkdir -p ~/Library/ODBC
- cp /opt/NetezzaODBCDriver/ini/*.ini ~/Library/ODBC
- Edit ~/Library/ODBC/odbcinst.ini to reflect were your driver is (Driver and Setup keys)
- In our example it'll be Driver = /opt/NetezzaODBCDriver/lib/libnzodbc.so (same for Setup)
Here's a small example usage:
Monday, September 16, 2013
Don't Forget Your Process When Selecting Tools
When selecting tools, there are many things you should consider - prices, value added, integration cost, health ...
However many teams forgot to check how well does the tool integrate with your current development process. A good tool that does not play well with your process will cause many problem and might alter your process a direction you don't want.
For example, we have a process (like many others probably) which involves code reviews. We have a tool with does not play well with code reviews - it has binary projects. The process with this tool is different, much slower and more error prone than the rest of the tools.
Next time you pick a tool to work with, think how well will it play with your current process and take it into consideration.
Note: It might be OK to change the process if the tool is worth it, just make sure it does before you integrate it.
However many teams forgot to check how well does the tool integrate with your current development process. A good tool that does not play well with your process will cause many problem and might alter your process a direction you don't want.
For example, we have a process (like many others probably) which involves code reviews. We have a tool with does not play well with code reviews - it has binary projects. The process with this tool is different, much slower and more error prone than the rest of the tools.
Next time you pick a tool to work with, think how well will it play with your current process and take it into consideration.
Note: It might be OK to change the process if the tool is worth it, just make sure it does before you integrate it.
Monday, September 09, 2013
Advice For New Managers
Here's some of the advice I give new managers. I try to talk to them before they start their first management job - let me be the first to ruin their career :)
Disclaimer: I'm not a manager, but I was managed by many and was an officer for many years in the IDF which is very informal kind of army.
Here they are, without any particular order.
Disclaimer: I'm not a manager, but I was managed by many and was an officer for many years in the IDF which is very informal kind of army.
Here they are, without any particular order.
Style
Every manager has their own style. From fire-and-forget to micromanagement and everything in the middle. Your style will probably be different from another manager (even from your own), your management style will change over time and from team to team. Play to your strengths - organizational, people skills, ....
Don't be afraid to try until you find a style that both you and your team are comfortable in. As long as you're open about what you're doing, you team will support you. It's hard to measure the effectivenehess of each style, but if you can - do that.
Let Go
You are a manager now, not a developer. I've seen very few managers in my long career that managed to do both effectively. Learn to trust your team and be a manager first and developer last.
Think about the things you liked and disliked in your past managers (and the current one) and figure out what you should do.
Manage Your Time
Management is very different from development, it's much more interruption driven. However you need to allocate time for yourself. I've seen the best officers in the army taking up to 30 minutes to think while all hell breaking loose around them (number 2 was in charge in the meanwhile). If they can do it - I'm sure you can.
Here's a great talk by John Cleese (of the Monty Python fame) about creativity which covers this topic as well.
Know Your Place
In officer training over at IDF, they teach you that an officer should be where he/she's most needed. Same goes for you - think about what you are the most effective at solving the more important things and be there.
Develop A Mantra
Find a sentence which will help you focus, and ask it repeatedly throughout the day. I found out that "Why aren't we deploying?" help our team focus and deliver. However find one that fits your goals/team/company ....
You Team Comes First
If you show your team they come first (mostly by "buffering" them from all the management noise), they will be loyal to you. Loyalty works both ways or it doesn't work.A loyal and jelled team is hard to build but when you get there - they will rock.
That's about it. Don't be nervous and try to enjoy a new position. In the worse case know that management is not for everybody (I personally don't like it). There's no shame in saying "this is not for me" and getting back to to fun stuff. (My brother did just that, he managed for a year and then said to the company - "Either I'm back to development or I'm out". He was back in development).
I hope that you found this useful.
Subscribe to:
Posts (Atom)