Archive

Archive for the ‘tech’ Category

Indispensable Enterprise Architect

February 9, 2011 Leave a comment

EA who focuses on clearly defined goals, closely aligned with current business requirements and practice using the current culture with clear progress metrics is indispensable. In other words, Indispensable EA is a half entrepreneur and half technologist.

Categories: architecture

Are you a Good Architect?

February 8, 2011 5 comments
  • Do you understand the problems?
  • Do you understand the scale of those problems?
  • Do you think outside the box?
  • Do you closely monitor your competitors?
  • Are you vigilant about your market?
  • Do you read technical blogs, magazines, news regularly?
  • Does new product or technology make you excited?
  • Do you anticipate and get motivated with changes?

Good Architect’s solution is not necessarily technically sound but will meet business requirements accurately and will adapt when business requirements change which in most cases will.

Try our ridiculously simple Agile PM Tool – Pairworks

Categories: architecture

Ruby Variable Scopes

September 27, 2010 Leave a comment

local
_local_too
@instance
@@class
$global
CONSTANT

Categories: tech

13 things I learned from 1 stupid mistake

September 17, 2010 Leave a comment

Yesterday everything was perfect; Today Apache gone crazy. It won’t start on my beautiful Mac with Leopard.
Trying to get my Apache back in shape, I learned quite a few lessons. Hope this will be useful to someone.

My Environment

Mac OS X Leopard, Apache,

Started apache, but http://localhost won’t work

It turned out apache didn’t start.
lesson: Apache won’t complain when started from terminal

No suitable image found… but wrong architecture

Apache could not load phusion passenger module. Apache was running in 64 bit but the passenger module was compiled for 32 bit.
lesson: 32 bit and 64 bit don’t go well together.

launchctl: CFURLWriteDataAndPropertiesToResource(/System/Library/LaunchDaemons/org.apache.httpd.plist) failed: -10

Start Apache without sudo, you see the above message. Its new requirement.
sudo /usr/sbin/apachectl start
lesson: Error messages are not friendly sometimes.

difficult to uninstall ruby, when NOT installed through port

When ruby installed by downloading the tar/zip file, it is hard to uninstall. Instead use a package manager like macport to install software.
lesson: Before installing, look for alternatives to install/uninstall.

easy way to update macport
sudo port selfupdate #upgrade to latest macport
sudo port sync
sudo port upgrade outdated #report the ports to be upgraded
sudo port upgrade --force installed #update the outdated ports

lesson: work with the latest software

run apache in 32 bit

Create a /usr/local/sbin directory if it doesn’t exist

sudo mkdir /usr/local/sbin
List httpd’s architecture types
cd /usr/sbin
file httpd
Strip out the 64-bit support
sudo lipo httpd -thin ppc7400 -output httpd.ppc  # PowerPC
sudo lipo httpd -thin i386 -output httpd.i386    # x86
Stitch them together into a single 2-way 32-bit binary
sudo lipo httpd.ppc httpd.i386 -create -output /usr/local/sbin/httpd
Edit org.apache.httpd startup plist
cd /System/Library/LaunchDaemons
sudo nano org.apache.httpd.plist
Change the line:

/usr/sbin/httpd
to ..
/usr/local/sbin/httpd
suggestion: won’t it be easy to start apache in a 32 bit with a switch
sudo /usr/sbin/apachectl start —arch=32
lesson: Usability is not considered always

which http.conf the apache uses

/private/etc/apache2/http.conf
lesson: work with the right configuration file

install ruby through port
sudo port install ruby

lesson: don’t always choose the known route, look for alternatives

upgraded passenger to 2.2.15

hoped upgrade would help apache to start, but no
instructions @ http://www.modrails.com/install.html
lesson: another thing ruled out.

how to use find command
find / -name "http.conf" -print

found multiple instances of http.conf.
lesson: keep great helpers in your toolkit, that will help you some frustration

where the host file resides
/etc/hosts

lesson: information everyone should know.

upgraded gem bundler- bundle install won’t work

reported error: only has been removed from the Gemfile DSL, and has been replaced with group.
Updated GemFile
lesson: Google made us lazy, read the errors carefully before googling. Errors might contain the actions necessary to fix the problem.

deactivate or uninstall ruby via port
sudo port deactivate ruby
sudo port uninstall ruby

when multiple versions exists you have specify the version
lesson: package managers are here to help us.

Thank God, I didn’t have to upgrade my OS to get apache working

Categories: mac, tech

How did Rack Middleware saved us?

May 28, 2009 1 comment

Have more Ideas, but less Resources? Exactly, it forced us to find an alternative to the traditional application development. We found ourselves repeating same features across multiple applications. One natural thought came to us, is to avoid repeating same features, which is cumbersome and time consuming. We needed a solution in which the common functionalities should be made available to multiple applications with less effort and less maintenance.
Problems duplicating same functionalities:
Let’s take contact us page as an example. All our applications, eServicePlace.com, PairWorks.com, eduHelp.in and our company website absolut-e.com need to have contact us page. Contact us is a simple page with a form, which users can use to contact us with their question. Well its a pretty simple that need a page, model, email notification, view the list of users and their questions.
How we did it?

1. develop the contact us functionality in eduHelp.in
2. test it and deploy to production
3. copy the controller, model, migrations to hiringopen.com
4. configure the necessary components
5. test it thoroughly and deploy to production

Using Rails Plugin:

1. develop the contact us functionality in eduHelp.in
2. test it and deploy to production
3. package it into a rails plugin
4. install it in hiringopen.com
5. test it
6. deploy and configure in production

As you have noticed, rails plugin helped us but not much to the extend we expected

Rack Middleware:

1. develop contact us functionality in a standalone application
2. test it
3. deploy and configure in a standalone production environment
4. create a rack layer for this application
5. add the rack layer to application like eduhelp.in and hiringopen.com that needed this functionality

Yes, no testing and configuration required in this case that saved us time and freed some resources. We just started using rack middleware couple of months ago and glad, we found it.

There are tonnes of rack middleware resources found in the web, please google it and let me know if you find any
interesting article.

Have you used Rack Middleware and how do you feel?

Categories: rack, tech