Saturday, December 17, 2011

Some advice for working with a web developer to develop a website

I am looking to have a website developed. I can actually program in PHP and have developed a not-so-simple social website myself, but I still haven't program with objects and I'm not that efficient (and I can't make things look good). Since I don't comparative advantage in developing websites, I'm working with a firm to do that for me. I've spoken to a couple of firms that design and develop websites, and received a couple of quotes. I asked my computer whiz colleague for advice on dealing with website development firms (I sent him one of the quotes that I received), and I'm pasting below his advice.

---
Looks great indeed. A few points:

    -There is no descriptive of your project. This means they eyeballed the cost, and have large safety margins. It's not a complex project, so it's not a major downside to eyeball the project as a whole instead of making an estimation by item.

    -They seem responsive, or at least tell you they will be. That is an important part. Communication is always key to good work relationship.

    -They offer two rate options: hourly and flat, which is a good signal. If it were me, I would go for hourly and guide them through the project: for sure the project will look more like what you want it, and it should end up cheaper (see my first point). But perhaps it does not matter enough to you, and you think they have better ideas than you on how the website should be. In that case, go with fixed rate.

    -I you want to go hourly, I would recommend you get the functional analysis before the actual coding happens:

    -graphical appearance (actual work. Do you have a logo?)
    -workflow of the data process (web page by web page),
    -schematic drawing of each interface,
    -data dictionnary.

Only then should you approve to start the coding. They wont like so much paperwork, but it is a good practice and protects everyone. I would also suggest to do as much work yourself as you can: draw schematic interfaces on your word processor and share with the programmer before he starts with the paperwork. The more you guide, the better (and cheaper) the project will be.

The alternative to guiding them with the hourly rate is to let them propose their stuff with the fixed rate. Do it if you are not risk averse, both on quality and time to completion. You can get surprises, both good and bad. Just a word of caution: there is also an outside risk of having a project absolutely not what you wanted and they ask for more money, arguing it was not in the contract. If the functional analysis is not complete, all bad things can happen. The devil is always in the details, and turnkey projects are not always as turnkey as we hope they will be...

Also, remember that coding is only a small part of the project. Calculate

    1/3 analysis and preparation
    1/3 coding
    1/3 implementation: Adjustments and changes, debugging, actual setup of the server ready for real data, etc.

Also, the work is not over even on the launch day. Expect problems, adjustments, etc... The more analysis you do, the easier the implementation. If they tell you 6 weeks, expect 3 times as much for your real launch day. No kidding. Get ready: it will take 3 times as much time as they say it will, always.

You should ask for the alpha version: the first version that allows you to see how the project works, with most of the interfaces ready, and then there is the beta version, the first complete version. Find friends and family to play around your beta version and try to crash the program: the more people who try the beta version, the better.

Analogous to what you are about to do is to make renovations in your home. Talk to home owners about their experience renovating, and you hear about horror stories. It's the same kind of problems in renovation and hiring a programmer: you can expect to handle (sometimes frustrating) issues on a regular basis for this project, turnkey or not. Fortunately, it's a small project, bet even then problems arise! There are financial risks involved, for the value of what you put it. Asking a contractor to make work for you is never a fully safe bet. Worse case scenario is you loose all of what you put in, and it happens in real life. Watch your back :)

But also sometimes you find the golden helper. No problems, goes out of is way to help, and you get what you want and on time. Rare, but they exist. Like in renovation: it's not always a catastrophe! It depends a lot on the rapport you will establish with the guys actually doing the work.

Finally, think servicing on the longer run. You will probably not want to do it yourself. Budget a minimum of 15% per year, (unexpected problems, updates of platform software creating problems with your code, crashes etc...) excluding expansion of functions, and also excluding amortizing for the next version of the project. Expect a complete rewrite from scratch in 2 to 5 years, depending on the speed at which your business changes, and the quality of the initial work.


Good luck!
---



Computer buying advice

Recently, my MacBook Pro, which I purchased in February of 2008, sort of died. The computer works, but the Nvidia video card has died. Apple has extended the warranty for this, but I'm stuck in Central Asia until March, so won't be able to get it to an Apple authorized repair facility. So I have to look for a new computer.

I'm wondering whether to forgo getting another Mac go back to using a PC. I'm not a fan of Windows, and a colleague of mine has recommended using Ubuntu Linux. He's a computer wiz, so can handle a non-standard operating system. I'm not so sure that I can. Anyways, that will be another post.

I asked said colleague for advice on buying a computer, and I'm pasting below what he wrote. Now, computer buying advice is far from timeless. And the advice you should get will depend on what you need the computer for. I will be using STATA (heavily computationally intensive), watching movies (need a good graphics card). My partner will want to do lots of document editing, and will want a big screen. It will stay in the home, so portability and battery life are not priorities.

---
I would indeed get a Sony Vaio. I currently use a rugged IBM lenovo that was lent to me, I appreciate its 5 hours of battery in Africa. But it's not that powerful (despite its 8 gb of memory); I would need to change it within a year or two.

    My suggestion is to obtain a core i5 with nvidia GPU (From Sony). My personal choice would be for a 16 inch high definition, but I tend to like big screens more than most.

    Make sure you upgrade right away to the maximum memory possible. Not doing so is not worth it: max it out! This means using a 64 bits Os: you need 64 bits addressing to go over 4 gb of memory.

      You will want a good graphics card inside your laptop. I recommend Nvidia based with at least 512 independent memory, preferably 1 Gb with a recent GPU. I prefer nvidia to the others, especially with Ubuntu. That is what in my opinion makes the biggest difference between the lower end and the higher end laptops. Macs always have high end graphics cards.

    Ubuntu is a big jump! Congrats. The most recent version is 11.10. I use 11.04. Make sure you have the 64 bits version, and you probably want to log in the desktop edition (Gnome), not the netbook edition (Unity). It's a combo box at login.

    I suggest you shop a little, perhaps on sony vaio's web site. Compare with other companies also if you want. I'm not sure what are the models these days...

 I stumbled upon this; it might help to compare laptops and get quite good reviews on them. I wish I could find all models on this :)

   http://www.pcmag.com/products/compare/1565?aid=264717,289826,266527,264126

This is a selection I made of very different laptop types. Hopefully comparing them will help you orient your search.
---

Saturday, November 19, 2011

How to add a custom category to the side bar on your blogspot blog, and populate it with links to selected posts

In my side bar on this blog, I have a category called STATA, below which are links to all my posts that are about STATA tips (right now, I have only one such post). Here is a link to the page that gave me instructions on how to do this:

http://www.bloggersentral.com/2010/04/list-recent-posts-by-label.html

Basically, here's what you need to do:

1. Pick a name for the category; this will be the same as the name of the label that you will apply to all posts that you want to include in the category. So your category could be something like (without the quotes): "STATA tips" (under this would be links to your posts related to tips on doing things in STATA) or "Books I am reading" (under this would links to your posts that discuss the books you have been reading)

2. In Blogger.com, click "Dashboard" and click posts to list all the posts for your the blog. Create the label that you chose in step one and apply it to all the posts that you want to appear in under this category.

3. Click "Layout" in the left sidebar and select "Add Gadget." In some templates for blogger, you might have to click "Design." When you click "Add Gadget" a pop-up window will appear.

4. In the left sidebar in this window, click the first tab, "Basics." Then scroll down and look for the Gadget "HTML/Javascript."

From here you can follow the instructions available at the link above. The only think I would do differently from the instructions at the link is that I would make the changes (e.g replace  YOUR_BLOG_URL, etc.) BEFORE saving, NOT after.

Good luck!

Friday, November 11, 2011

How to embed a spreadsheet into a blog

A friend of mine is a translator (English, Russian, Tajik), and she keeps in a spreadsheet a record of some of the phrases and words she translates. I suggested that she make this available on line for other translators to refer to. We had no idea how to do this, so I looked up how to embed a spreadsheet into a blog (she has a blog). I found the following resource:

http://www.geekestateblog.com/how-to-create-embeddable-spreadsheets-for-your-blog/

Which it tested. It works - see the embedded test spreadsheet below:



If you want to change the content of the spreadsheet, you can log into your editgrid.com account (free, see the link above) and make the change in your original spreadsheet. When you refresh the blogpost page, it updates the spreadsheet with the change.

The only think I have found, so far, that one needs to be mindful of is that if your text is longer than then size of the cell that you put it in, then you need to adjust the with of the column in your editgrid.com account accordingly, in order to show the entire content of the cell.

UPDATE: Suppose you want to use google docs instead of editgrid.com. It is possible - check this out:



This actually looks MUCH better. The instructions that gave me a rough idea of how to do this are here:

http://www.blogdoctor.me/2006/12/google-docs-spreadsheets-in-your-blog.html

But actually the directions don't match the menu options available in google docs - it must be outdated, I guess. For example, this link says to "click on Publish in the upper right corner to open the Publish sidebar on the right side..." etc.  Here are some updated instructions (as of 18 Nov 2011):


1. In google docs, open the spreadsheet that you want to embed in your blog.
2. Click "File" then select "Publish to the Web" to open the publishing menu.
3. Under the second heading, the one that says "Get a link to the published data," click on the box immediately below it (which by default is "Web Page"), and select "HTML to embed in a page."
4. There is a textbox at the bottom - in that text box is HTML code. Copy and paste this code into your blog (make sure you've set your blogger editor to "HTML" and NOT "Compose"). 


Anyone have any ideas on how to get the "Sheet 1" out of the spreadsheet name above? Or how to reduce the size of the box when there are lots of empty cells?





Tuesday, August 23, 2011

How to select a digital camera

This is not comprehensive. I simply thought I would relate my experience in selecting a digital camera, so that others might benefit. Basically it is an email exchange, in which I asked a friend, who is knowledgable about photography, for advice on selecting a digital camera. I ended up buying the Olympus XZ-1 (see my review on Amazon; a link to the product is below). I have pasted below the e-mail exchange:

My email to him:

Hey Alex, I just met up with [NAME] for lunch, which reminded me to
solicit your opinion on digital cameras. This one looks good (see
below). But my only worry is that I might be locked in to using Sony's
proprietary memory sticks. What do you think of this camera?

Sony Cyber-shot DSC-HX9V 16.2 MP Exmor R CMOS Digital Still Camera
with 16x Optical Zoom G Lens, 3D Sweep Panorama and Full HD 1080/60p
Video

http://www.amazon.com/gp/product/B004HYFX0C/ref=as_li_ss_tl?ie=UTF8&tag=ohmission-20&linkCode=as2&camp=217145&creative=399373&creativeASIN=B004HYFX0C

http://reviews.cnet.com/digital-cameras/sony-cyber-shot-dsc/4505-6501_7-34547260.html?tag=contentMain;contentBody;1r#reviewPage1

His response:

Lucky you -- DPReview just published a comparative test featuring this Sony:
http://www.dpreview.com/reviews/q311travelzoomgrouptest/

You'll see that Canon and Nikon win, and Sony follows close behind. However, I see very little reason to buy ANY of these cameras. I simply see ZERO use for the superzooms of such cameras. I also don't understand why in the world you would need 16MP, or anything above 10MP.

In my opinion, the absolutely BEST compact camera on the market is Olympus XZ-1. Primarily because of it's excellent lens, which allows to take quality pictures in relatively poorly illuminated conditions without the need to bump ISO (which ALWAYS results in noisy pictures).

http://www.amazon.com/gp/product/B004HO59LK/ref=as_li_ss_tl?ie=UTF8&tag=ohmission-20&linkCode=as2&camp=217145&creative=399373&creativeASIN=B004HO59LK

BTW, CNet is a terrible place to read camera reviews. You don't want reviews from gadget people, you want reviews from photographers. Here are photographer reviews of XZ-1:

http://www.luminous-landscape.com/reviews/olympus_xz_1_review.shtml
http://www.outbackphoto.com/CONTENT_2007_01/section_gear_cameras_2011/20110618_Olympus_XZ1/index.html

And here is DPReview take (DPReview is the oldest and probably most reputable photo equipment review site):
http://www.dpreview.com/reviews/OlympusXZ1/

Saturday, August 20, 2011

A review of the materials I've used for learning the Russian language

I've been trying to learn the Russian language for more than a year now. It has been tough. The Russian language coordinator at my work recently assessed my spoken Russian as "Intermediate - Low." I think she may have been overly generous. Also, it is possible that I was able to give the impression that my skills are more advance than they really are simply because I memorized some phrases that I need to use often.

The Russian language coordinator asked me to give my opinion on the various materials I've used in my efforts to learn Russian. I am pasting below the e-mail I wrote to her.

Here is my evaluation of the learning materials I have used:

1. Pimsleur Russian, 90 lesson set. I recommend this as a starting point, the first material that one should use for learning Russian. One can use the audio lessons while driving, on the treadmill, etc. The reading lesson might be good for learning the alphabet (I'm not sure because I did only the audio only lessons). The pace is right, and if it is too fast, one can repeat lessons. It is great for learning pronunciation. And it explains why certain words change depending on use (without mentioning cases or the names of cases.)

2. Colloquial Russian: The Complete Course For Beginners (Colloquial Series). I'm on Chapter 7 right now. This book is good. The pace is right also. Rather than giving you the rules all at once, it introduces them gradually, to allow you to absorb them. It gives a few verbs and their conjugations in each or almost each chapter. Don't try to memorize these. Just keep progressing through the book, doing all the exercises. It is best to start the Pimsleur set before starting this book. I don't have the audio, just the book, so sometimes I have trouble pronouncing the words. It would help to either know the alphabet before starting, or get the audio files for the book. I'm told that there are mistakes in the book, so look out for these. I don't know yet if there is an errata web page.

3. Rosetta Stone. This is good for increasing vocabulary, and learning how words, phrases and sentences should sound. It works by word-picture and phrase-picture association. It is a series of short lessons, mostly 5, 10 or 15 minutes long (intro's to the lessons are 30 min long). These are estimates - the time it takes depends on how fast the user responds (this is a computer program that you install and use on your computer). One downside is that it doesn't tell you why endings change the way they do, it doesn't mention cases or declensions. So if you use this I suggest combining it with the colloquial Russian book. Another downside is that it doesn't break up long words and phrases when teaching you how to say them, which makes learning how to say them that much more difficult. Also, all 3 levels are expensive, and have enough exercises to last probably 100 hours. I'm not sure whether the time it takes is worth what you get out of it. But if you do use Rosetta Stone, make the maximum effort with it. Pronounce the words even when you don't have to (e.g. when you're only required to click on the right picture or phrase).

4. Schaum's Outline of Russian Grammar, Second Edition (Schaum's Outline Series). This is definitely NOT for beginners. This book throws a whole bunch of rules at the reader, then presents many exercises. Do NOT start with this. The proper step for this book, if any at all, is after you have reached the intermediate-high level. This book is supremely boring, and requires motivation for completion. Also there is at least one English grammatical mistake in the book, which makes me wonder about the Russian.

I think that they best way to use the above resources is to use them in the order presented above.

5. Random Russian Teacher. It is difficult to teach a language, and some people who speak both English and Russian very well think that they can teach Russian to English speakers effectively, simply because they have a good command of both languages. I disagree. It take more than this to be able to teach a language- it takes an understanding of how people learn languages in general and what works best for specific individuals. A good teacher will ask you why you want to learn the language, what you want to learn, and will tailor the lessons to meet your goals. My teacher in Tajikistan has an exercise book from which she photocopies lessons, and she has me work through them. It is too much, too fast, and we don't do any review of previous lessons, so not much of it sticks. Also, a lot of what we learn is irrelevant to me. I have absolutely no intention of touring Moscow, and if I end up touring Moscow, I would do it only once or twice. But I very often do need to be able to speak about the technical parts of my project in Russian, and understand when people are speaking about the same to me in Russian. I also would like to be able to use the imperative tense often- For example, I need to tell taxis to go here, there, turn left, right, go back, drop this person off, pick me up right away, and then go bring another person here by X o'clock, etc. A good language teacher will find out that you want to and need to learn these kinds of things. Few people actually know how to teach a language. When you find a "Russian teacher" (usually this is just someone who calls him- or herself a Russian teacher), you will have to teach that person how to teach. It would be great if someone could develop an instruction manual that would teach teachers how to teach Russian. To be able to quickly get by in Russian, it would help to write down the phrases that you think you will use most often, and memorize the Russian translations of these. You could make flash cards of these or find a smartphone flashcard application. Periodically add to this list and memorize more translations (e.g. you might add new phrases that you think you will need, or new responses you have encountered to the phrases you've used). This will help you develop an ear for Russian; i.e. knowing what sounds right. I'm not sure how useful watching Russian movies is, with or without the English subtitles; I have yet to try this.

Saturday, May 7, 2011

STATA tip: restore/preserve value labels after using the collapse command (and a link to doing so for the reshape command)

UPDATE 28 November 2012: Forget this post. I wrote a program to do this, which you can find here.

UPDATE 03 July 2012: I updated the code so that it works (there were some typos before)

Using the collapse command in STATA tends to remove value labels and variable labels. Below I have included code to save and restore the value labels (assuming you keep all the variables except the 'over' variable that you specify in the collapse command).

This is simple and has probably been posted elsewhere (and there is probably an easier, more elegant solution). The collapse command really should include an option for this.

If you want to learn how to restore value labels after using the reshape command, see this link:
http://www.stata.com/support/faqs/data/labels_reshape.html

For preserving value labels:

// Save and restore value labels
// Shafique Jamal, shafique.jamal@gmail.com
// Saturday 7 May 2011

// define the path for saving temporary files
global path_for_tempfiles "/Users/shafique/allfiles/ECA_projects/TJ_social_assistance/data_qnr/raw/zerkola2012pilot"

// This is the list of variables for which we want to save the value labels.
label dir
local list_of_valuelables = r(names)

// save the label values
label save using $path_for_tempfiles/label_values.do, replace
// note the names of the label values for each variable that has a label value attached to it: need the variable name - value label correspodence
   local list_of_vars_w_valuelables
   foreach var of varlist * {
   local templocal : value label `var'
   if ("`templocal'" != "") {
      local varlabel_`var' : value label `var'
      di "`var': `varlabel_`var''"
      local list_of_vars_w_valuelables "`list_of_vars_w_valuelables' `var'"
   }
}
di "`list_of_vars_w_valuelables'"

// do the collapse here

// redefine the label values
do $path_for_tempfiles/label_values.do
// reattach the label values
foreach var of local list_of_vars_w_valuelables {
   cap label values `var' `varlabel_`var''
}