Think Open Source is just a new technology buzz word or another way to talk about computers? Think again. At OG Consulting our understanding of Open Source expands its lessons and philosophies to more than just a technology strategy but also to project management, conflict resolution and business development. OG Consulting marries the social sciences and insights into culture and the economy with a vast knowledge of current technologies and future trends. We believe technology should be invisible and procedures open and extensible. Our battleground is the inefficiency and distractions brought forth from technologies that constantly require human intervention in order for them to continue to perform their designed duties or the human inefficiency that stunts innovation and cooperation in companies.
Opening the Door to Open Source for Businesses
Drop Shadows and Snapshot Borders - Automating Image Manipulation
Many of the web projects we do have tons of images that require manipulation and processing. Although the GIMP and Adobe Photoshop are extremely powerful tools, they require a user. That would you be you, sitting in your chair, operating on images by hand with your mouse, stylus, and keyboard. You can do amazing things, but a lot of times you’re just processing over and over and over. When you want to speed things up and move on to more interesting tasks, you will turn to ImageMagick, a set of command line utilities for processing images en masse.
A nice effect that I enjoy is the "snapshotization" of digital photos. Take a look.

Parameters I wish to adjust:
- Rotation (arbitrary)
- Border width and color
- Shadow depth, transparency.
- Background color
Mysql 4.0.x LATIN1 to Mysql 4.1.x UTF-8 Nightmares
Whew! Finally I have accomplished what I had been putting off for a while, namely a MySQL upgrade that had been due. Here’s the problem:
What would normally be a straightforward LATIN1 or ISO-8859-1 to UTF-8 character conversion turns out NOT to be. Why? Well, just because the old database character set defaulted to LATIN1, and most things were stored in LATIN1, not everything was. This very website, powered by Wordpress, has been storing data as UTF-8 since forever. So we have a problem. Can you see it? The database and its data are mostly LATIN1, but some data are not.
An automated mass conversion would not be possible.
See why I had been putting it off?
The solution, if you can call it a solution, is to convert all the tables that are NOT Wordpress first.
Read the rest of this entry »Fighting the Good Fight Against Spammers
The holiday season is crazy enough for ordinary citizens going about their daily routine, shopping, fighting traffic, long lines, time deadlines. Then there’s the threat of credit card and identity theft. If that’s not enough, we workers in the IT world have to deal with the maleficent opportunists that seem to come out of the woodwork to ply their warez, spam, and botnets at this time of year.
Over at Altamente, I’ve been battling spammers and hackers constantly since the day after Thanksgiving. Why Thanksgiving, do you ask? I’m so glad you asked. It’s simple. In the US, from Thanksgiving to the last shopping day before Christmas, consumers will account for roughly 17% of all retails sales.
Spammers and hackers want their cut.
Whether it be phishing, hacking, or spamming, they have been a constant pain in the neck.
Imagine my surprise this morning when I noticed the email was slow. I peeled back the carpet to find a hoard of roaches swarming about.
Yeach.
Tons of messages were in the outgoing queue from an anonymous user, spam messages sent by my server to unwilling recipients. I was shocked and disgusted. How could this have happened? I took a deep breath, decided not to panic and calmly looked through the logs and web traffic. I already suspected a rogue web script on some virtual host somewhere. Let’s have a look at which client has gotten a bump in server traffic recently.
And there is was, a script being used by one of Altamente’s clients, wp-email.php. Now, in all fairness to the author, he has since applied a bit of paint to his "Email Article" plugin for Wordpress in the form of a Captcha. In my case, however, I overlooked the patch and the result: spammers had been injecting an automated attack against the script to deliver their payload as if it was a normal email.
Solved! But I’m still annoyed. Remember people, any php or web script that allows a user to send email needs to be thoroughly checked against such variable over-writing. All input strings must be parsed and checked. Put up email forms at your own peril.
Or at least watch them carefully during the Holidays.
Multi-lingual Wordpress with Apache2 and Content Negotiation via index.html.var
That’s a mouthful, isn’t it. In short, I’m writing this little tutorial for those that need to maintain a Wordpress site in more than one language. This particular setup is geared toward Wordpress, but the techniques can be used for other html files and Content Management Systems.
First, use Apache’s new index.html.var file. You will find a copy in your default webroot that comes with a default Apache installation. This index.html.var file will take the place of your index.html or index.html.xx file residing in your root directory. Without getting too technical the file is just a mapping of user language requests to appropriate localized content wherever it may be. It’s way more flexible than MultiViews.
The Five Most Common Lies in Business
From an article on Fast Company
Lie: "People are our most important asset."
Truth: "People are our most worrisome and unpredictable asset. Our most important assets are really our financial assets."
How is this true? A pile of capital - so what does it do? Really, I’d like to know about this autonomous manifestation. If true, I could retire today. While I agree, people are our most worrisome and unpredictable asset, they are no doubt the most IMPORTANT asset.
Procedural Flash Animation in Linux
This is an introduction to creating completely non-interactive, or procedural flash animation using Linux. The beauty of this is not that you can do more, or that it’s prettier, or even faster to create. The beauty lies in the power. Once an animation procedure is set, the elements can be changed simply by including new images, colors, or messages. In fact, I’m working on a simple web-form to generate the above animation by simply uploading elements and text inputs.
But first, let’s get to the tutorial, shall we?
The door scene modeled in POV-ray scene description language and is typical of Old San Juan, Puerto Rico Spanish Colonial architecture. The real doors are beautiful. If you ever get a chance to take a cruise from/to Puerto Rico, don’t miss the chance to walk around Old San Juan (El Viejo San Juan) and check them out. I rendered three frames with the doors rotated from 0 to 75 degrees to simulate… guess what? Opening doors. Clever, huh?
There’s a lot of POV code, here’s a little bit of what it looks like:
cylinder { <0, 0.5, 0>, <0, -0.5, 0>, 0.5
texture {
pigment { color rgb <0.6, 0, 0> }
normal { granite 0.02 turbulence <0.5, 0.9, 0.2> scale 0.25 }
finish { specular 0.1 reflection .1 }
}
}
It’s pretty simple. You place objects in an X-Y-Z space (Cartesian coordinates) like a sphere, cylinder, box or any other of the predefined primitives. You can merge them, subtract them, intersect them in creative ways. Finally, you apply some sort of texture which includes a pigment, a surface (normal), and a finish (reflections effects etc). There are easier ways to model, but sometimes POV-ray’s scene description language is just the most elegant and easiest way to model something.
The next step was to convert the png files to jpegs for inclusion in the flash animation. I used a little sprinkle of bash and a dash of kosher ImageMagick’s convert.
for file in *.png; do convert -quality 100 "$file" "${file%.png}.jpg"; done
For each png file, convert the png file to a 100 percent quality jpeg file. We use 100% quality because I’m going to let the swftools take care of the final compression. There’s no sense in lossy compressing then lossy compressing again. That’s just crazy talk.
We will now create the flash source file. Open a new file slideshow.sc. This is the textual language for the swftools Linux Flash toolkit. I have never ever ever looked at a flash source file from any Macromedia product, so I have no idea if this animation description method looks/acts/walks/talks in anyway shape or form like Macromedia’s products. Don’t know, don’t care.
.flash bbox=640x480 filename="slideshow.swf" version=6 fps=25 compress background=white
.jpeg s1 "puerta_open03.jpg"
.jpeg s2 "puerta_open02.jpg"
.jpeg s3 "puerta_open01.jpg"
.font font "gilc____.ttf"
.font arial "arialbi.ttf"
.text text1 text="Opening Doors" font=font
.text text2 text="Opening Doors" font=font
.text text3 text="Opening Doors" font=font
.text text4 text="OG" font=arial
.text text5 text="Experts in" font=font
.text text6 text="Open Source" font=font
.put s1 scalex=640 scaley=480 alpha=100%
.put text1 scale=100% x=40 y=220 alpha=0%
.frame 25
.put s2 scalex=640 scaley=480 alpha=0%
.change text1 alpha=100%
.put text2 scale=100% x=40 y=220
.frame 100
.change s2 alpha=0%
.change text1 alpha=100%
.change text2 alpha=100%
.frame 125
.change text1 alpha=0%
.change text2 alpha=100%
.change s2 alpha=100%
.put s3 scalex=640 scaley=480 alpha=0%
.put text3 scale=100% x=40 y=220
And so on (that’s not the whole file, but the rest is just repetition. There are 71 total lines of code for that little flash animation. Is that a lot or a little? Seems pretty small to me anyway. Basically, with swftools you define an object (image, or text); you put it; then you change it. You can change its fade, size, location, and more. The swfc program will implement the change from the object’s last known state. Check out swftools for more examples (that’s where I got all the reference I needed to make my little flash thingie).
So there you have it. I walk through the frames, changing elements, putting, fading, growing, moving stuff around. It’s was all described from start to finish in a procedural language, from the POV-ray scene description language, to bash and ImageMagick for command line image manipulation, and finally to swftools flash scene language for the final animation. Pretty nifty, huh?
Check out: http://www.altamente.com/ for another example.
The neat thing about this is that once the procedure has been developed, you can reuse it for other clients, other looks, colors, messages, etc. In fact, you could directly render it on the server to update information on the fly via end user input. There’s no limit to what you can do with something like this.
Of course if you’re on Windows, you would probably just buy Macromedia’s software… but where’s the fun in that?
Ruby on Rails - Insert Multiple Child Records
I have been having a bafflingly hard time trying to figure out the proper way to insert multiple child records from one single webform. It is the standard fare for posting things like invoice headers and details. Say for example, you’ve got an invoice record which consists of an order number, date and whatnot. That particular piece of tabular data is then considered the parent of its child line items (product_id, description, quantity, price, etc). So you’ve got this Order which consists of an invoice and line items.
It’s pretty basic, but I’ve had the hardest time figuring out how to do this is Ruby on Rails. I know it’s not hard in theory, but with Rails, since there is only One Right Way(TM) to do things, ’cause you’re on Rails, it takes a bit of doing to figure out this Right Way(TM). I personally don’t have a problem doing it Rails’ way, but please dear God, just tell me what it is. I bought the book and everything.
So
here’s the dope, folks. Please correct me if there’s a better way of
doing this, ’cause I’m a Rails n00b. For reference sake, I am using
Ruby on Rails 1.0 with Postgres 8.0.4 and Ruby 1.8.4
Tras la Pista del Consumidor Tecno-Sapiens
En la evolución del ser humano se han dado nombres a vertientes que muestra una divergencia significativa de la evolución. Homo Habilis era hábil con herramientas, Homo erectus caminó de pie. A modo de diversión pero a la vez para reflejar un cambio en la conceptualización del consumidor. Por ello en vez de empezar con “homo” empiezo con consumidor asumiendo que el poder adquisitivo lo ejerce un ser humano. En repaso de las nuevas tecnologías y su efecto sobre el consumidor hablo entonces del “Consumidor Tecno-Sapiens.” El Consumidor Tecno-Sapiens, variante del ser humano moderno que está virando al revéz su relación con los medios. Hasta ahora la literatura del usuario del consumidor de televisión lo presentaba como una persona aplataná en el sofá sirviendo de esponja a todo lo que se sirve por las ondas televisivas o el famoso “couch potato.” Al pensar en mercadear o desarrollar marcas se pensaba en exposiciones a productos a ese receptor pasivo.
Read the rest of this entry »Why Good Programmers Are Lazy and Dumb
We at OG Consulting have been saying this for years. Frankly, we are the laziest and dumbest consultants around.
Why Good Programmers Are Lazy and Dumb by Philipp Lenssen
I realized that, paradoxically enough, good programmers need to be both lazy and dumb.
Lazy, because only lazy programmers will want to write the kind of tools that might replace them in the end. Lazy, because only a lazy programmer will avoid writing monotonous, repetitive code – thus avoiding redundancy, the enemy of software maintenance and flexible refactoring. Mostly, the tools and processes that come out of this endeavor fired by laziness will speed up the production.
Of course, we work very hard at being lazy. We’ll find resources you might not have thought of (because we’re lazy). We might write a business automation system (because punching numbers is boring and computers are good at it… and we’re lazy). We might help you better program your employees because we don’t want to do their work and neither do you. And we will ask the dumb questions you might not. In short, we don’t assume we know more than you do about your business. In consulting there is no shortage of professionals who help you spend your hard earned money to complicate your processes, accounting, Internet strategy, or software implementation.
We’ll probably lose our membership in the Secret Order of Consulting Professionals for saying this, but we don’t suppose it’s any secret - consultants obfuscate things to render the illusion of success or progress while billing by the hour. OG Consulting is neither motivated enough nor smart enough to pull that off. We’d rather help you make your business processes brain-dead simple so we don’t have to think so hard and neither will you.
And that’s the bottom line. We’re too lazy and dumb to fail.
The True Price of Software
Free/Libre Open Source Software has been criticized for undermining the pricing of software. This interesting piece published in ONLamp, exposes the true financial underbelly of the software market. We find out, that software really wasn’t worth much to begin with.
except from "Calculating the True Price of Software" by Robert Lefkowitz
… the major difference in worldview between open source advocates and proprietary software license advocates is explainable as a differing opinion on the correct value of the volatility of maintenance and upgrade pricing. People who believe that the pricing on maintenance is stable and unlikely to change see greater intrinsic value in the software. People who fear that the pricing is subject to large fluctuations see no intrinsic value in the up-front license; stripped of the options, the license value approaches $0.
For the open source movement, perhaps a better way to position the change that OSS is making is this: we’re converting warrants on future maintenance and enhancements into options, which means that instead of having a sole supplier (warrants), we have created a third-party market (options) of these derivatives.
How capitalistic is that?
The conclusion is that even without all the financial analysis, Free/Libre Open Source programmers have stumbled upon an inevitable truth; software by itself isn’t worth much and the proprietary vendors know it. What has flourished in recent years is a free flowing market where vendors may compete to sell customers maintenance, support, and upgrades.