Delomos's Posts
Nairaland Forum › Delomos's Profile › Delomos's Posts
1 2 3 4 5 6 7 8 9 10 11 12 (of 12 pages)
*dhtml:Amen oo [size=15pt] [/size] |
@Beaf: Yes, it can be true that PHP is not a strongly typed language like Java or C# but PHP 5 (soon to be 6) was a huge transformation in the language. PHP is a very under-estimated language, I actually used to myself until I discovered it's power. And often, it depends on the problem domain. |
@nwanna89 nwanna89:Java, C#, C++ <== C and usually, most people (project) stick to one of those. And you made a good point, perhaps if you read the original question, you might answer that, s/he is trying to decide between C# or PHP. @lordZOUGA I must admit, I'm very lazy, actually, that what got me attracted to programming, my laziness, if I can make a computer do the work, why the f^^k should I be doing it? Since you're quite hard-working, you found 1 pattern and stuck to it, serious? Of the dozen+ popular patterns, you stuck to just one? I think that explains why you don't see any deficiency in your codes; how about leaving C++ alone for a while, get back to your beginners mind and learn && understand a few more patterns perhaps it might help you write more efficient algorithms. |
nwanna89:1. Can you tell me those non-java languages you're referring to AND what you did in those languages? 2. Isn't hiding implementations (at least when learning), a crutch? Yes, there are tons, and tons of java libraries/methods, and, even more Java programmers writing "crutched" code. |
nwanna89:Try and read previous answers and understand why Java might not be such a great choice. |
*dhtml: No be so ooo , I no be that much of a serious guy, I just suck at arguing , Speaking of dying of boredom, maybe I go start some topics in a bit, so MEN can discuss ![]() |
@IbroSaunks: You made an interesting point, but, it's not really about if you have the brain power or not. In anything in life, making small steps is great. When is comes to it (As as already being said repeatedly), when you get the solid grasp of one, the rest is easier to grasp -- under the hood, they're all the same, just approaching things in a different way. So, It's strongly advisable to do just one. As a side-note, in my college days, the algorithms classes where in Java, which you'd do for a while, then the advanced classes start tacking shit in C (Not a fan of either langauge or maybe I'm just a slacker)@lordZOUGA: From a bird's eye view, every language is different but poking deep, you'd see they are all the same. The issue is not really if a language is hard or soft, it all comes down to what problem you're trying to solve and how effectively can you solve it. If you want to write an operating system or design your own programming language, you'd better know your C (ruby, php, c++, c# are all C's descendants) , not that you can't in other languages it's just that your OS will be slllllooooooooowww. If you're trying to design a web blog or a gallery site, your C knowledge will fail you seriously. Starting "hard" shouldn't be about the language, it should be about doing the hard work of learning the basics. Such as, why should I use a PHP "while" or "for" or "switch", or heck, is this "class" encapsulating a problem, or sets? or should I write this OO or just functional-ize the code -- now learning those basics is hard. |
@Mobinga: In that light, I rest my case. |
@charlsecy4: I do have the paper copy not ebook, but I'm sure you can look around to 'find' the ebook. @toluxa1: No, dump the book (for now) and go with the hard way lessons -- sorry I sounded confusing. |
SimonAndal:In order of sweetness: Israel, China, or Philippines I know you said no US, but if you really can knock it -- MIT's or UCLA's AI can be beat. But generally, you can get to a top-notch in Israel and exchange classes in those. |
Beaf:I don't mean to sound like a PHP fan boy here, but PHP v5 is not a spaghetti type language (you must be referring to PHP v4), for web dev, PHP will be around for a long while, a very long while. And it's possible to write spaghetti code in an language it's only easier in others than some. As it is now, I don't really see must changing in terms of how professional web dev is done, PHP is strictly back-end, HTML5 strictly frontend. Apps than want to communicate with the outside [server] world will still need some type of query language (SQL) or ss-language (PHP, Ruby, Python, etc) |
toluxa1:Yes, Yes, Yes. Learning Python is an interesting book (I own a copy too). But Zed Shaw (the author of the 'hard way') doesn't just teach you python syntax, he also teaches you HOW to solve programming problems, usually exercise and reading documentations and writing clean/effective code that is a huge plus in learning to code |
A while ago last year, I wrote http://occupy9ja.com/ (twitter: @occupy9ja & @occupynigeria) which was quite a coincidence; shortly after I finished the project, an unrelated movement #OccupyNigeria came up -- long story short, the site is becoming a slow planning hub for the online movement. I built the site intentionally simple, an would most like maintain that paradigm. I'm wanting to expand on the project but I'm strain on time (and maybe motivation?), I'm seeking kind folks to join the project, in what ever way you can. And for folks just sinking their teeth into web dev or social coding, this might be a good way we can all collaboratively make/join the change in our country. I think it'd be fun and absolutely non-intimidating -- even if you don't code, you can help in others ways in the project (#OccupyNigeria) What you need: A Github account: http://github.com A Cloud9 account: http://c9.io/ Please help me out. Thanks oh ![]() |
*dhtml:@*dhtml: Please don't confuse the questioner. NO, NO! the world is not now all OOP, OOP is *just* a pattern that most languages now strongly support it is not a language itself! C'mon, if you speak many languages you should know that. You can write OOP code in ANY language, yes, even C. Any language that allows you to declare a "function" or at least encapsulate code blocks can use the pattern. And NO, it's not better to start out OO, understand the basics first! And yes, PHP v5 natively supports OO. |
ekt_bear:F***ing right mate! There is hardly any interview these days (that's worthwhile) that wouldn't have you tackle these puzzles, which will somewhat then your knowledge of Data Structures, Algorithms, Design Patterns and Logics. One thing I'm slowly realizing is that in programming, leaning a language syntax is oft the easiest of solving real problems. |
Since we're on the subject of functional programming, some, attacking this with JavaScript , var array1 = [0,8,1,0,0,0,8,6,7,8,9,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1,1,3,0]; var array2 = [1,0,0,0,8,6,7,8,9,1,3,0,0,8,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1]; var array3 = [1,0,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,0,0,8,6,7,8,9,1,3,0,0,8,9,1]; function findPattern(array, array1, array2){ var result=0; for(i=0; i<array.length; i++){ if( array[i] == 1 && array[i+1] == 3 && array[i+2] === 0 && array[i+3] === 0 && array[i+4] == 8|| array1[i] == 1 && array1[i+1] == 3 && array1[i+2] === 0 && array1[i+3] === 0 && array1[i+4] == 8|| array2[i] == 1 && array2[i+1] == 3 && array2[i+2] === 0 && array2[i+3] === 0 && array2[i+4] == {result += 1; } } return result; } alert(findPattern(array3, array2, array1) + " Pattern found!" ;see is in action here: http://jsbin.com/edopas/edit#source (just click render) |
@Beaf: Very nice reads. I should also add that classic ASP is dying rather fast anyways. But I do think HTML5 is a different ball from languages like PHP, Ruby, or other server-side - - they solve different problems. HTML 5 is client-side/front-end which is just a buzz word really (think Ajax or Web 2.0), under the hood, H5 is just plains old HTML with native JS libraries. I think we can both agree that JavaScript and PHP & co. are not competitors. And that's not to say that most of the sweet things CSS3/H5 brings depends highly on browsers support (that isn't really standard yet). I doubt that companies really want to trust client-side storage for anything sensitive. |
@ekt_bear: I agree with you totally, bigger company lean towards Python, one, it's older and it's US-born (the creator of the language actually works at Google, see the bias ). And I should also add that Ruby is popular among web-dev'er mostly because Ruby on Rails framework and it's gems/library (as your pointed).And picking Python (I crazily recommend that hard way thingy or if you're feeling funky, visit: http:///z6TrVJ (also from Zed, the author of the programming hard way series) isn't a biggie if you're comfortable with Ruby, I personally mostly mix Ruby with shell scripting. |
To be a good programmer, you have to practice, practice, and practice programming -- I wouldn't advice that you completely rely on learn to program in school, you have to do a lot of work yourself. That's the pragmatic part. To do well in school, well, you know the answer to that. But to do well in the real world, I repeat, practice programming. You might find this article interesting: http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html |
wale4x35:Yes, I've used it but not on serious projects (I mostly do it with the other stack HAML/SASS), it's introduces interesting syntax to JS but then, when debugging, you have to go back to plain ol' JS -- in some way; my opinion is that people don't want to take the pain to learn the *good* parts of javascript and turn to the abstraction of coffeescript. No doubt you can write faster, I like it ruby-like syntax (and some control structure it introduces to JS, unless, etc), but then, IMO, I love syntax flexibility, that compiling thing is some biggie, though when I do coffeescript, I generally compile on the fly with: "Live Reload", and of course there's Node.js if you're so inclined. For now, just plain javascript for me and it doesn't replace JS, it's more a compliment. Btw, if you're want to pursue CffS, checkout my fork of this fine book: https://github.com/delomos/Smooth-CoffeeScript |
*dhtml:Isn't this needless self-promotion, I don't see how visiting that page answers this question? You should read the responses already given, don't just respond for the sake of it, your response has added even more confusion to the mix. |
ekt_bear:You're not missing a lot, I actually prefer Ruby to Python though Python seems faster (getting more into the ruby world lately though) -- but in these days where more and more is moving to the cloud, and computing time is cheap, Ruby and it's gems are definitely are sweet. |
logica:Abcde f g Hij Klmn Op Qrstuv Wxy Z Result Abcd efg Hij Klm Nop Qrst Uvwx yz Amen to that! Just in case you're solving similar problem in the future, just have parse into the pattern (you might have to fine tune per your language): A[b-d]+\n[e-g]+\nhig\nKlm\\nNop\nQ[r-t]+\nU[v-z]+\/nyz$ |
ekt_bear:IMO, very unlikely you'd be stuck between this choices. |
I love this!!! Love, love, love it! And I'm striving to really start doing some mentoring , what are you suggesting? |
SimonAndal:What branch of CS are you hoping to concentrate on? |
Beaf:Can you explain what that means? |
C# and PHP are almost two similar languages with one distinct difference, one is strongly-typed, the other doesn't compiles at run-time. If none of what I just said makes sense, forget learning C# or PHP, learn the basics first. What you want to aim for is to be able to "speak" multiple languages and pick up new one with ease; not understanding the basics makes that difficult, learning syntax is only half the story -- since you're new, I will strongly advise against PHP or C#, they seem simple but they have a lot of crutches and gotchas for a bigger (plus too many barriers to entry). Try learning a language that you can start being productive almost right away and also learn core coding skills. In my experience, all those videos, and all solve specific problems and narrow things down too much, not good for starting out. I advice you learn coding with Python or Ruby (not both), ignore the nay-sayer or all the big buzz-words flying around, start simple (yes, everybody wants to write their own "cool" stuff then the world is fool of junks) -- and you can start right away here: http://learnpythonthehardway.org/book/ and if you prefer to get a book, get this: Python Programming: An Introduction to Computer Science (don't let the tile scare you, it's really fun) Welcome to the fun world of programming, we're the learning never stops ![]() |
I see you're using Wordpress, see this plugin: http://wordpress.org/extend/plugins/facebook-registration-tool/ |
ekt_bear:Well put, and in that light I will answer the question -- what is an algorithm? http://dictionary.reference.com/browse/algorithm What is coding/programming?[url]http://www.apl.jhu.edu/~hall/java/beginner/programming.html[/url] When you've gone through those links, you will understand that developing algorithms is nothing trivial AT ALL, and this particular algorithm you asked for is here.http://blog.linkibol.com/2010/05/07/how-to-build-a-popularity-algorithm-you-can-be-proud-of/ Now for the code part, you have many languages you can choose from to translate that algorithm to. My real question is: why do you want to solve this problem? It's already been beaten to death in many languages -- unless this is an academic practice, go out and have fun, don't re-invent any wheels. And for everyone shooting "code, code, ", I will like to see your implementation of this algorithm, I might learn something from your solutions ![]() |
[/size]
{
;