Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,853 members, 7,810,284 topics. Date: Saturday, 27 April 2024 at 05:23 AM

Build A JAMB Result Checking Website To Win 150,000 Naira - Programming (8) - Nairaland

Nairaland Forum / Science/Technology / Programming / Build A JAMB Result Checking Website To Win 150,000 Naira (63325 Views)

President Buhari Voice Recognition Program - Contest For 50,000 Naira / Build A Mobile App Without Knowing Any Programming Language or line of code. / Convert Existing Website To Phone App? (2) (3) (4)

(1) (2) (3) ... (5) (6) (7) (8) (9) (10) (11) (Reply) (Go Down)

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by techytom(m): 11:45am On Apr 05, 2012
Seun:
Please, please, do participate. We need to have some competition here, to make this a real contest. Start right away.


Got it to work yesterday. The instructions were not sufficient - I also had to install memcache.py from github. The problem I have now is that the registration numbers I got from the database did not show any results.

I've provided a copy of the registration information on the index page, so you'll always have a working registration number and pin
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by techytom(m): 11:51am On Apr 05, 2012
yamakuza:

any way u can host it and drop the url here or on ur siggy?
Do you mean the code or a live website??
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by yamakuza: 11:57am On Apr 05, 2012
techytom:
Do you mean the code or a live website??

live website

google apps maybe?
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 12:00pm On Apr 05, 2012
Don't waste your time on the live website. It's not part of the competition and it's not very important. Focus. wink
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 10:46pm On Apr 05, 2012
toluxa1: Seun please I have a question. I am currently learning Python and you were actually the one that inspired me to pick it up. Am not a beginner to programming though. I want to know if Python has a Certification they do like Microsoft, JAVA etc? If yes can one do it in Nigeria?

You didn't enter the contest. It would have been an excellent certification for you. ;-)
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 12:36pm On Apr 06, 2012
Any updates?
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by techytom(m): 12:49pm On Apr 06, 2012
Seun: Any updates?
Yes, I've been commit and pushing to my repo
The current code version is pretty stable, I've tried improve the performance of the website by caching.
I'm still exploring other features in cherrypy
and code is up to version 0.0.6
http://code.google.com/p/emergency-jamb-result-checker/downloads/detail?name=orchardv0.0.6.zip

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 1:05pm On Apr 06, 2012
@techytom Can we chat? Would like to find out more about you.

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by techytom(m): 1:44pm On Apr 06, 2012
Seun: @techytom Can we chat? Would like to find out more about you.
Yes, I just sent you a Nairaland Email Message
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by pystar: 10:01pm On Apr 06, 2012
@Seun,
I have cleaned up my repo. Its works to a certain level now. Do check it out http://code.google.com/p/nairaland-jamb-checker/
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Fayimora(m): 12:26am On Apr 07, 2012
23hrs 25mins to go

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kadeerna: 9:00am On Apr 08, 2012
Repo is at http://code.google.com/p/kadeer-jambpy/

This is my stab at an implementation of a relatively scalable implementation of a read heavy app which is the case of JAMB's examination results checking website. Even though I don't support the idea of limiting the dozens of applicable tools to the problem, I have come out on the other side with 1 more language under my belt, Python.

Before the replies begin to refer to this one, I want you to understand that this implementation / solution refers to the JAMB's candidate accessible database for the SOLE purpose of checking their results. That means JAMB can have multiple versions of their databases. A few used internally, but most importantly 1 candidates check their results against.

I was prompted to enter this challenge mainly by the many arguments I have seen on the thread with majority examining the problem of JAMB's catastrophic failure in 2012 to provide read access to results for ~ 1.5million between day 0 and 2 of releasing results, as an issue simply requiring MORE servers or hosting in the cloud. Yes that could help, yes that helps, but still a far off shot from all the hundred or thousands of other things architects & designers should work on before going for that "all reliable" solution of throwing more hardware at the problem. A few examples of such an optimization are the selection of proper database table field types, use of indexes on the tables, normalization OR denormalizaion, sharding and partitioning, caching and others I will talk about in detail given time. Just a bit about proper field type now.

Using chars in place of varchars in my implementation, varchar(50) and char(50) can hold up to 50 charachters of text, but the difference is that char only uses as much space as there are characters for on a row-by-row basis. Variable row sizing might sound good at first - after all, why leave unused space to waste? The problem lies in the fact that, becasue varchars can vary in size, mysql need to calculate the length of each varchar field in a row so it knows how far to jump to get the next record. Compare that to using char as the data type, where mysql can just add 50 (in my above example) to get to the end of one field and start of another.

Another optimization is the collation type and character set used for fields. The JAMB examination result checking website is a Nigerian+English only database. Probably to vague to comprende but my point is the database stores records and charachters comprising of english alphabet letters [A-Za-z] and numbers [0-9] a few other characters [.=]. If the designer of the database knows this, why use UTF, LATIN or other convoluted character set when ASCII can do the job. Comparing an ASCII record ex "left" = "right" will be faster than comparing Unicode or some other ISO encoded string of the same u"left" == u"right". Storing ASCII "left" COULD also save more space than storing u"left".

Normalization of such a READ heavy database like JAMB's results database I feel is simple illogical and unnecessary. Why even try to do a join? Just because I can do one is not necessarily the right approach to designing large apps. As much as possible, JOINS should be eliminated because they are evil (thinking Illuminati?). Better denormalize and partition or shard against a unique consistent field key. With normalization, single tables, single databases, single instances will grow large. Many rows in tables, logs, connection and threads to manage in the case of instances are there to manage. I will try to expand on this point and few others in a subsequent reply (if need be).

The source code is also dotted with suggestions and ideas as to how the a few things will change in a real implementation.

So, this is a result of 3 days of learning and coding Python. Depends on Bottles 0.11.dev, CherryPy 3.2.2., python3_memcached-1.44-py3.2, MySQLDb, Jinja2. CherryPy might need to be patched with the latest changes to the wsgiserver3.py source. The latest changes are can be applied by pasting wsgiserver3.py in the root of the repo in the "cherrypy/wsgiserver" folder in the "site-packages".

Begin by
- Running "Create DBs" under the "db-Ops" menu on the home page,
- Generating say any number of results and cards in using the "Number of results to generate" & "Number of cards to generate" forms at the top of the home page
- Running the "Load MySQL Memory Results DB" & "Load Memcache Results cache" to load the results data into MySQL memory tables and memcache cache.

Every time you restart you mysql server, make sure to run "Load MySQL Memory Results DB".

Oh, and last word. "OFF COURSE IT'S NOT COMPLETE"

Update:
Almost forgot, uncomment 1 of lines 51, 52, or 53 of result_controller.py to select a data store repo strategy. MySQL Shards, MySQL Memory or Memcache. Need I say restart the server.

Update
Crap, had pushed the wrong db setup script. Fixed now.

4 Likes

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 10:21am On Apr 08, 2012
@kadeerna: Wow, last day ninja entry. Oh my.

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by jacob05(m): 10:59am On Apr 08, 2012
posting mine today also but the setup not ready

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by techytom(m): 11:24am On Apr 08, 2012
Finally... That is some cool strategy @kadeerna
Sharding+ caching, really cool
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kadeerna: 11:54am On Apr 08, 2012
Seun: @kadeerna: Wow, last day ninja entry. Oh my.

Hehe. *evil laugh*

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kadeerna: 12:27pm On Apr 08, 2012
techytom: Finally... That is some cool strategy @kadeerna
Sharding+ caching, really cool

@techytom Thanks man.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kadeerna: 2:08pm On Apr 08, 2012
Updates pushed to my repo http://code.google.com/p/kadeer-jambpy/.

Zip file download, a few quirks I had seen have been fixed.

Would have wanted to create an installer for the project, but I think I have learnt enough Python for 4 days.

Lemme know what you all think.

Phew!.

I am willing to update and improve the code based upon suggestions new and later. Feel free to ask me any questions.

I do VB (not so much anymore), C#, Ruby, Ruby (lately), Javascript.

2 Likes

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 2:23pm On Apr 08, 2012
@kadeerna: I think it's really wonderful that you picked up Python for this contest. Which MySQL version did you test with?
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kadeerna: 2:34pm On Apr 08, 2012
@Seun tested with mysql v 5.1
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kadeerna: 2:50pm On Apr 08, 2012
@Seun

I am also a firm believer that languages have their strengths and problem areas where they can and should be applied to. Could be as basic as reducing code repetition like mixins, eliminate the need to redo everything like ""[-1:], or advanced ex. languague's supporting infrastructure, excellent IDE (Visual Studio), rock solid orm (Doctrine) and more.

Picking up python has been worthwhile i must say.

3 Likes

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 4:00pm On Apr 08, 2012
@kadeerna: Did you use Python 3.2 and a Python3 compatible MySQL library, and CherryPy as the web framework, as per the rules?
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kadeerna: 4:17pm On Apr 08, 2012
Seun: @kadeerna: Did you use Python 3.2 and a Python3 compatible MySQL library, and CherryPy as the web framework, as per the rules?
Absolutely. Mentioned here http://code.google.com/p/kadeer-jambpy/wiki/Dependencies.

@Seun
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 4:38pm On Apr 08, 2012
@kadeerna: I'm unable to install MySQLdb on my local copy of Python 3.2.2. Can you try MySQL Connector/Python?
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by jacob05(m): 5:27pm On Apr 08, 2012
kadeerna: Updates pushed to my repo http://code.google.com/p/kadeer-jambpy/.

Zip file download, a few quirks I had seen have been fixed.

Would have wanted to create an installer for the project, but I think I have learnt enough Python for 4 days.

Lemme know what you all think.

Phew!.

I am willing to update and improve the code based upon suggestions new and later. Feel free to ask me any questions.

I do VB (not so much anymore), C#, Ruby, Ruby (lately), Javascript.
You are a genius Man!!! Stepping out to learn more from you man! Thumbs Up Man .. Waiting for the final and fixed version. Peace
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 5:33pm On Apr 08, 2012
jacob05: You are a genius Man!!! Stepping down my project to learn more from you man! Thumbs Up Man .. Waiting for the final and fixed version. Peace
I will need you to please post your version and not "step out". Thanks. For 150k you should at least try your best. angry angry angry

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by jacob05(m): 5:54pm On Apr 08, 2012
ok boss.lol
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by techytom(m): 7:29pm On Apr 08, 2012
@seun, I've got new code updates to include better code structure, better error management, better caching.
I'm sticking out my solution with great emphasis on caching. The repository remains the same:
http://code.google.com/p/emergency-jamb-result-checker/ cool

2 Likes

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 9:05pm On Apr 08, 2012
@techytom: There seems to be an issue with the footer in your results page.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by techytom(m): 9:12pm On Apr 08, 2012
Seun: @techytom: There seems to be an issue with the footer in your results page.
Thanks, I'll check that now

(1) (2) (3) ... (5) (6) (7) (8) (9) (10) (11) (Reply)

Meet Dare Obasanjo Who Works With Microsoft / The Greatest Programmer On Nairaland / Funny Programming Memes. Just For Laughs

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 41
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.