Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,568 members, 7,809,072 topics. Date: Thursday, 25 April 2024 at 10:25 PM

Algorithm Workout! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Algorithm Workout! (4884 Views)

Your Toughest Algorithm / Ludo Game Algorithm Wanted For AI Project / Algorithm For Solving Systems Of Linear Equations (2) (3) (4)

(1) (2) (Reply) (Go Down)

Algorithm Workout! by farouqzaib: 12:48pm On Jul 19, 2011
Hello guys,
I have been seeing a couple of "coding challenge" posts on nairaland. You guys(Fayimora, naija_swag, all of u n even those whose code was whack sha! kidding) are doing a great job. It's great to start something, no matter how small. I don't know if you guys have heard of www.topcoder.com, if you want to compete on an international level, you should/have to be there. I used it a couple of times before when I was trying to grasp algorithms, I never went past the basic searching and sorting algos. I couldn't decide between web dev and hardcore Java programming wit algos, so I ended up giving up on algos. They were first of all tough to begin with. Imagine having to code a doubly linked list when u are just a beginner(I understand there are geniuses among us). For those of u guys wanting to learn algo, I know it can be a lot daunting at the beginning but you should know there are people around to help you(with code, books/resource, criticism(constructive ones though)). Also a common argument in Nigeria is always, why will u want to be a hobby programmer(algo guys without money) when you can learn php/ one web stuff and make money. To that I don't have the answer. We cannot all be doing the same thing. For you the fortunate ones(pun intended) who find urselves wanting to do algo, g'luck guys and God speed. I'll pop in once in a while to see what I can learn or correct.
Re: Algorithm Workout! by Fayimora(m): 1:17pm On Jul 19, 2011
Fact but i always preach something. Take java for instance, for you to understand algorithms fully you must follow a pattern. FIrst you need to understand procedural programming. Then you need to understand Object Oriented programming before even thinking of algorithms, Its just like trying to run when you have never crawled
Re: Algorithm Workout! by farouqzaib: 1:35pm On Jul 19, 2011
Correct me if I'm wrong, I don't think anybody writes procedural code with Java. I believe it takes a deeper level of understand of problem solving in order to tackle any algorithm problem. Knuth, Djikstra and all of 'em were mortals, they just possessed that "stuff". Anybody wanting to learn algo should be prepped for a long tortuous but rewarding ride. @Fayimora, Have u watched any of MIT's lecture on Algorithms. Started with those proofs and all, I understand the idea of the Big Oh( complexity analysis). The thing is I hate maths, so I just got lost in the proof. Cheers
Re: Algorithm Workout! by Fayimora(m): 1:57pm On Jul 19, 2011
Yeah no one programs procedural in java because its an OOP lang(apart from the small programs), but hey bits of OOP are formed by a procedural knowledge. I have the lectures on my system and i never get tired of them. Maths can be a NaughtyWoman but man i think you should go back to it, lol
Re: Algorithm Workout! by Mobinga: 5:50pm On Jul 19, 2011
farouqzaib:

Correct me if I'm wrong, I don't think anybody writes procedural code with Java. I believe it takes a deeper level of understand of problem solving in order to tackle any algorithm problem. Knuth, Djikstra and all of 'em were mortals, they just possessed that "stuff". Anybody wanting to learn algo should be prepped for a long tortuous but rewarding ride. @Fayimora, Have u watched any of MIT's lecture on Algorithms. Started with those proofs and all, I understand the idea of the Big Oh( complexity analysis). The thing is I hate maths, so I just got lost in the proof. Cheers
I do.
Re: Algorithm Workout! by naijaswag1: 11:19pm On Jul 19, 2011
@farouqzaib

I will quote Robert Lahore,he said in his book,"Simply knowing the syntax of a computer language such as Java or C++ isn’t
enough".I started learning java last year and realized what Lahore said and I went back to sharpen my skills and get my brains to work faster,algorithmically and data structures wise.I am in chapter two of his book currently and I just finished the programming projects at the end of the chapter,one of the projects gave me headache and sleepless night for two days but I cracked it this morning-merging two ordered arrays of equal or unequal length with random generated numbers.

I know about topcoder,I tried to join but was getting errors on registering.I am actaully preparing for google codejam africa and worldwide for next year feb and may.I am also doing facebook competition.I tried googling algol and its closely related to algorithm.
Re: Algorithm Workout! by farouqzaib: 10:02am On Jul 20, 2011
@Mobinga, I understand the fact that the individual functions/methods of a class are made up of procedural code but u just don't declare a function in Java and use it, or maybe I'm missing something.
@naija_swag, I can say I'm at a level in computer programming where nothing scares me. I started with Java bout 4 yrs ago. I think I got hooked on algos(algorithm) when I saw something about an international computing olympiad n then IBM's ICPC(which I almost reped ma school in naija zone). I studied data structures, though I didn't delve too deeply into trees. I suppose I was trying to do too much at the moment. So like I said I had to choose between web dev and algos with Java. I can do fairly well with any coding problem. I just don't have what it takes to go all the way, yet. I have a couple of books about algos,. The two parts of Knuth's, MIT's carlsen et al, Springer's algo with Java n a couple of videos. You guys are really giving me the inspiration to go back to it. Because one thing I get from solving a coding challenge is the satisfaction and self fulfillment of achievement. I dunno yet. maybe I'll attempt some future coding challenges you guys post and ya'll tell me how I did(make una no trash me o!). Keep up the good work guys. One day we'll show 'em.
Re: Algorithm Workout! by farouqzaib: 10:12am On Jul 20, 2011
@naija_swag, Please what is the name of the Robert Lahore book you are reading? I don't suppose it is "How to be a programmer"?
Re: Algorithm Workout! by Fayimora(m): 11:55am On Jul 20, 2011
farouqzaib:

@Mobinga, I understand the fact that the individual functions/methods of a class are made up of procedural code but u just don't declare a function in Java and use it, or maybe I'm missing something.

Errm i dnt understand this part. Do you mean you cant declare a function and call it from somewhere else like a main method? If yes then you are wrong. Check some of the threads that contain java code like my coding challenge series cheesy
Re: Algorithm Workout! by farouqzaib: 12:08pm On Jul 20, 2011
@Fayimora, what I meant was that you can't just declare a function without it being in a class, take Java codes as example. Then of course u could then call the function from the class.
Re: Algorithm Workout! by Fayimora(m): 12:51pm On Jul 20, 2011
hmmm ok yeah u cant
Re: Algorithm Workout! by naijaswag1: 10:02pm On Jul 20, 2011
farouqzaib:

@naija_swag, Please what is the name of the Robert Lahore book you are reading? I don't suppose it is "How to be a programmer"?
Thats even Robert Lafore and not lahore.The book is data structures and algorithms in java.See am a new guy in java,you have done this for 4 years but am a new dude who taught himself java in the last one year.All i did was to read books one of which was bruce eckel's thinking in java and then his design patterns TIP,I know spring and hibernate but i really want to improve myself before the year ends.I am not going to read knuth's until next year when i must have made gaint strides so as to program at that level probably with some functional programming like erlang.I am going to teach java soon so i need to finish all the programming problems in the book.
Re: Algorithm Workout! by Fayimora(m): 10:56pm On Jul 20, 2011
Hmm one year in java,  I suppose you could do [url=https://github.com/fayimora/Projects]one of these[url] then. Start with the aquarium, it pretty much fun cheesy. Happy anniversary BTW
Re: Algorithm Workout! by naijaswag1: 11:21pm On Jul 20, 2011
lemme understand who owns all these projects,one person or different individuals?
Re: Algorithm Workout! by Fayimora(m): 11:40pm On Jul 20, 2011
Errm i did most of them and others that i havent added too cheesy .So mine, pick anyone you like, Please pick the Fish Tank cheesy
Re: Algorithm Workout! by farouqzaib: 8:48am On Jul 21, 2011
@naija_swag
Thank you very much, you have been helpful. I'll get the book and see if I can make time to dig in. Thanks guys.
Cheers
Re: Algorithm Workout! by Pheeque(m): 12:31pm On Jul 22, 2011
I wonder why you guys are bordered about standalone programming languages when the world moves more and more towards the web, My take on the whole algorithm 'palava' is that the only reason i would learn algos/data structures is to enhance php's core or maybe a javascript engine or something.If you think of it,these algos y'all are clamouring about are already established.for instance (i have a little background in java),yes you have the power to actually manipulate your bits and bytes but why would i want to create/design a new data structure/algo(even though i'm only copying some other guy's methodology) when i can use the collections framework that's already established.

Even google thinks the whole idea of supposed low level programming is far fetched.That's why they designed there own programming language(g or something) and have you seen how all there applications are seamlessly connected and managed?.Think of it alone makes me teary-eyed. wink

Now i need you to meet these guys - Fantasy Interactive(www.f-i.com).They develop real applications for the web using dynamically typed programming languages(flash,javascript) that speak volumes.Is it the project for google(www.20thingsilearned.com) or the job they did on messages for japan(forgotten the link but you can google it anyways).

My point here is that,rather than re-inventing the wheel,why don't we develop applications that actually see real world use.You can possibly tell me that f-i.com designs new datastructures for every project they take part in!.

Moreover,I hear html5 introduces some neat api's that you cant get your head all around.I can think of several ways to implement fayimora's football simulation challenge with html5 canvas already.

My two cents grin

1 Like

Re: Algorithm Workout! by farouqzaib: 3:41pm On Jul 22, 2011
@Pheque,
I don't think anybody here is learning algos for the fun of it @ least I'm not. The idea is to understand how best to optimize the computer memory and operations using tried and tested patterns(yeah, all patterns derive from other ppl, check gang of four). Why use a linear search when you can use mergesort or other O(n) functions? You reduce the fetch cycle of the computer and that makes your code effective.
I disagree that low-level programming is far-fetched, those guys who write highly efficient code in H/L always go out of their way in writing such code n there ain't no way they'll be able to that if they don't have a good working knowledge of algos. Google, Oracle, MS high geeks for a reason.
Google you referred to uses very complex algorithm for it's search and all. There is even this guy that's a billionaire(dollars) who exploits some very complex algorithm in stock market(can't remember his name). The idea is not to just learn algorithms, there has to be a balance between building functional programs and usability.
Re: Algorithm Workout! by Nobody: 4:31pm On Jul 22, 2011
Re: Algorithm Workout! by naijaswag1: 10:01pm On Jul 22, 2011
@Pheeque

This thread is not for a typical quasi Nigerian programmer like you.Do you know what they call the guys at facebook and google-engineers.these guys dont just write trivial codes or html;they write intelligent codes that makes the world a better place.let me tell you how to get work at facebook,go and search facebook puzzles,it contains about 25 algorithmically inclined problems,if you can solve those,you will be hired.then we have google codejam and topcoder.the ide and tools that you use,you think that they were coded with html,what about softwares that enterprise uses like bank softwares,management software and the rest.you dont belong here,get off this thread.
Re: Algorithm Workout! by mxxpunkxx: 1:16am On Jul 25, 2011
naija_swag:

@Pheeque
let me tell you how to get work at facebook,go and search facebook puzzles,it contains about 25 algorithmically inclined problems,if you can solve those,you will be hired.

suicide!, for HIM , lol
Re: Algorithm Workout! by instinctg(m): 10:35am On Jul 25, 2011
naija_swag:

@Pheeque

This thread is not for a typical quasi Nigerian programmer like you.Do you know what they call the guys at facebook and google-engineers.these guys dont just write trivial codes or html;they write intelligent codes that makes the world a better place.let me tell you how to get work at facebook,go and search facebook puzzles,it contains about 25 algorithmically inclined problems,if you can solve those,you will be hired.then we have google codejam and topcoder.the ide and tools that you use,you think that they were coded with html,what about softwares that enterprise uses like bank softwares,management software and the rest.you dont belong here,get off this thread.
Easy bro, web apps exist everywhere. ERP's , Banking Solutions (intranet) etc use web based apps. I just think the guy is looking at his immediate environment where complex programming is not really valued.
That being said, dont think like a local programmer, look up to international standards.
Re: Algorithm Workout! by Pheeque(m): 1:49pm On Jul 25, 2011
@the non-quasi programmer

If after writing a passage explaining my take on algorithms,you can deduce 'that' from it, how do you even read and understand any of facebook puzzles when your level of understanding is this-for the lack of a better word-stout.

I guess its gonna take a while for my fellow nigerian programmers to see things the way i see 'em.As i am not one to argue meaninglessly,I'd suggest we actually put our theories to test.

So,I challenge you -non quasi- to an application contest.I'll develop an application utilizing html5 and whatever comes with it,while i expect a program that makes heavy use of the complex datastructures and algorithms you were going to kill for(I am expecting a program that makes the jpeg compression format look like childsplay. wink ).

Then we can now determine who actually understands the reason computer programming was actually created!.I dont know about you but i actually want to be the next steve jobs than working my a** off for zuckerberg

A programmer is not defined by how many sorts he can implement in a 10-second time frame but by how well he actually puts the computer programming paradigm to use.I mean peace.

1 Like

Re: Algorithm Workout! by farouqzaib: 2:04pm On Jul 25, 2011
@phequee
Slow down mate! You have every reason to be mad but that doesn't mean you have to explode. It seems we all were talking and no one was listening. You urself didn't belittle the power of algos and data struc and it's not like we are trying to create new algos we r just trying to understand d established ones better and share experiences. Besides I agree with you that I'll rather be the next Jobs than work 9-5 for Mark.

NOTE: It's trivial implementing a computer paradigm the challenge comes in implementing it efficiently.
Re: Algorithm Workout! by Fayimora(m): 3:18pm On Jul 25, 2011
Sorry guys if this is gonna have to continue then am gonna have to lock this thread!
Re: Algorithm Workout! by Kobojunkie: 10:48pm On Jul 27, 2011
@Poster, if you want to learn algorithms, then you are probably best getting into understanding the following

a) Asymptotics (Notations and all) -- P.S Lots of maths needed

b) Data Structures -- both simple and advanced -- learn the advantages and disadvantages of each

c) Study some known algorithms and their running times . . . understand the advantages the one has over the other etc.

d) Spend a lot of time learning GRAPHS -- as far as I am concerned, to get good in designing of algorithms, you need to understand how to represent your problem in graph format as it makes it easier for you to traverse and essentially design for

e) Learn a programming language -- notice how this is the last thing suggested? Well, that is because you do not necesarily need to know a programming language to write algorithms. Many of the currently used algorithms were written by pure mathematicians.

good luck!

1 Like

Re: Algorithm Workout! by Fayimora(m): 10:51pm On Jul 27, 2011
Well said! You are like the first female I have seen in this section cheesy
Re: Algorithm Workout! by njira(f): 2:39pm On Aug 01, 2011
Hi Guys,  My friends and I have our own algorithm competitions arena

PLEASE CHECK US OUT at http://cmaegerton.kenet.or.ke/index.php

I am the reigning champion using Python smiley
Re: Algorithm Workout! by mxxpunkxx: 3:13pm On Aug 01, 2011
^ In the land of the blind; da One-eyed man is king !!!
Re: Algorithm Workout! by Nobody: 4:12pm On Aug 01, 2011
Algorithm in Computing would likely be different from what you get in Mathematics. Just in a simple term in Computing Flow charts will do better than calculations when treating Algorithm. Well, mathematics is still very unique in many of the procedures per se.
Re: Algorithm Workout! by njira(f): 4:18pm On Aug 01, 2011
@all4naija good point, you see i am not a computer science student, but i am a mathematics student, i believe thats one of the main reason i got attracted to algorithms

(1) (2) (Reply)

Reasons Why Programming Is A Dangerous Profession In Nigeria. / Java Vs C# Which Do You Prefer? / Help How To Run Cmd Commands As An Admin In A C++ App

(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. 64
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.