Re: [nyphp-talk] Learning to program the right way

2012-01-27 Thread Ajai Khattri
On 1/27/12 1:37 PM, Federico Ulfo wrote: I don't know how we arrived to the debugging discussion but I'd like to share with you guys the script I use to debug my apps https://github.com/rainphp/rainframework/blob/master/system/library/error.functions.php is very handy, just include it in your pr

Re: [nyphp-talk] Learning to program the right way

2012-01-27 Thread Federico Ulfo
I don't know how we arrived to the debugging discussion but I'd like to share with you guys the script I use to debug my apps https://github.com/rainphp/rainframework/blob/master/system/library/error.functions.php is very handy, just include it in your project and it will display infos and backtrac

Re: [nyphp-talk] Learning to program the right way

2012-01-27 Thread Jeff Slutz
For more invisible/seamless debugging server-side I've found error_log() to be extremely handy as it doesn't change the display output at all. JS -- Jeff Slutz JSLEUTH LLC 3242 44th ST APT 3F Astoria, NY 11103 c. 970.443.9390 j...@jeffslutz.com On Fri, Jan 27, 2012 at 1:14 PM, David Krings wrot

Re: [nyphp-talk] Learning to program the right way

2012-01-27 Thread David Krings
On 1/27/2012 10:14 AM, David Mintz wrote: I could not possibly imagine living without Firebug and FirePHP. I am thinking more along the lines of XDebug. Never used Firebug and FirePHP, but I will take it for a spin...when I ever get around to do some PHP coding again. Years back I looked aroun

Re: [nyphp-talk] Learning to program the right way

2012-01-27 Thread Gary Mort
On 1/27/2012 9:34 AM, David Mintz wrote: Debugging has scarcely been mentioned in this thread. Perhaps the proposed "Right Way" syllabus should include how to debug right along with unit testing and version control, since these three are related tools/skills. I am especially weak on debugging

Re: [nyphp-talk] Learning to program the right way

2012-01-27 Thread David Mintz
On Fri, Jan 27, 2012 at 10:11 AM, Rukbat wrote: > On 1/27/2012 9:34 AM, David Mintz wrote: > >> [...] >> >> As a perpetual wannabe (day job that is formally not IT-related, but >> self-appointed self-taught coder and general-purpose geek for our federal >> court interpreters' office), I have stum

Re: [nyphp-talk] Learning to program the right way

2012-01-27 Thread Rukbat
On 1/27/2012 9:34 AM, David Mintz wrote: Debugging has scarcely been mentioned in this thread. Perhaps the proposed "Right Way" syllabus should include how to debug right along with unit testing and version control, since these three are related tools/skills. There might be a sort of middle w

Re: [nyphp-talk] Learning to program the right way

2012-01-27 Thread David Mintz
Debugging has scarcely been mentioned in this thread. Perhaps the proposed "Right Way" syllabus should include how to debug right along with unit testing and version control, since these three are related tools/skills. There might be a sort of middle way where you introduce coding first, and then

Re: [nyphp-talk] Learning to program the right way

2012-01-26 Thread Rukbat
On 1/26/2012 12:22 PM, Tedd Sperling wrote: On Jan 26, 2012, at 11:34 AM, Ajai Khattri wrote: On 1/26/12 11:03 AM, Rukbat wrote: As someone who started by writing machine code (not assembly, bits - and in octal, which was the big thing back when we wrote code on stone with wooden chisels), I

Re: [nyphp-talk] Learning to program the right way

2012-01-26 Thread Tedd Sperling
On Jan 26, 2012, at 11:34 AM, Ajai Khattri wrote: > On 1/26/12 11:03 AM, Rukbat wrote: >> As someone who started by writing machine code (not assembly, bits - and in >> octal, which was the big thing back when we wrote code on stone with wooden >> chisels), I can say that's very true. > > As so

Re: [nyphp-talk] Learning to program the right way

2012-01-26 Thread Gary Mort
Hi David, thanks for the excellent suggestions! In all honesty, I think some people are viewing my goals as loftier than they are. I don't plan on writing a book or designing a curriculum. Instead, I want to go through one of my old "Learn to program Object Oriented PHP" and rejuggle the les

Re: [nyphp-talk] Learning to program the right way

2012-01-26 Thread Ajai Khattri
On 1/26/12 11:03 AM, Rukbat wrote: As someone who started by writing machine code (not assembly, bits - and in octal, which was the big thing back when we wrote code on stone with wooden chisels), I can say that's very true. As someone who also cut his teeth writing code on 6502 and 68000 pro

Re: [nyphp-talk] Learning to program the right way

2012-01-26 Thread Rukbat
As someone who started by writing machine code (not assembly, bits - and in octal, which was the big thing back when we wrote code on stone with wooden chisels), I can say that's very true. I've sen some C code that, when it was compiled to assembly, was absolutely terrible. (And don't get me

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Jay Lozier
On 01/24/2012 03:08 PM, Leam Hall wrote: On 01/24/2012 02:52 PM, Justin Dearing wrote: I was going to make an argument that assembly might not be needed at the associates level, but writing this has made me question that myself. However, I think its more important to be able to read assembly

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Leam Hall
On 01/24/2012 02:52 PM, Justin Dearing wrote: I was going to make an argument that assembly might not be needed at the associates level, but writing this has made me question that myself. However, I think its more important to be able to read assembly than write assembly, so maybe it should be

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Justin Dearing
On Tue, Jan 24, 2012 at 12:23 PM, Christopher R. Merlo wrote: > Justin is, as usual, correct about all of this. But as someone who's been > involved in CS curriculum design at the associates level for going on 12 > years now, the problem -- at least for us at the community college level -- > is t

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Brian O'Connor
I can't speak for anyone else's experience other than my own, but when I went to get my degree in CS I was exposed to version control, unit testing, code reviews without sacrificing any other of the core topics associated with the degree. Most of those "non-core" cs tools we're taught in the first

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread David Krings
On 1/24/2012 12:23 PM, Christopher R. Merlo wrote: Justin is, as usual, correct about all of this. But as someone who's been involved in CS curriculum design at the associates level for going on 12 years now, the problem -- at least for us at the community college level -- is that we can only ma

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread David Krings
On 1/23/2012 1:17 PM, Gary Mort wrote: One thing that has annoyed me more and more over time is the way books and classes go about teaching /how/ to program in a language. They all start off with "Hello World" and then progress slowly form there to more and more complicated things. I've noticed

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Philip Camilleri
i don't wish to start a separate discussion here, but maybe the problem lies with the University/College education system here in the US. I went to school in Europe (a few years back, nonetheless, when the system was somewhat different to what it is today). But the philosophy back then was to get

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Leam Hall
On 01/24/2012 12:23 PM, Christopher R. Merlo wrote: Justin is, as usual, correct about all of this. But as someone who's been involved in CS curriculum design at the associates level for going on 12 years now, the problem -- at least for us at the community college level -- is that we can only

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Christopher R. Merlo
On Tue, Jan 24, 2012 at 11:46 AM, Justin Dearing wrote: Personally, I think that at some point in college the following should be > taught to CompSci, MIS/IT, Engineering and Finance majors: > * How to code > * How to use source control (presented to IT in a way that covers devops, > storing confi

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Justin Dearing
On Tue, Jan 24, 2012 at 11:11 AM, Gary Mort wrote: > On 1/23/2012 10:52 PM, Froilan Cajayon Mendoza wrote: > >> Gary, >> >> I think the key to programming the right away is to understand the logic >> and structure of solving the problem the right way. This is where >> algorithms and data/program

Re: [nyphp-talk] Learning to program the right way

2012-01-24 Thread Gary Mort
On 1/23/2012 10:52 PM, Froilan Cajayon Mendoza wrote: Gary, I think the key to programming the right away is to understand the logic and structure of solving the problem the right way. This is where algorithms and data/programming structures come into play. My first-time-in-programming stud

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Froilan Cajayon Mendoza
hich makes it worse :)). If you're solid 'programmatically', those tools can be easily (again, relatively) learnt. Froilan On Mon, Jan 23, 2012 at 2:02 PM, wrote: > > > Message: 1 > Date: Mon, 23 Jan 2012 13:54:11 -0500 > From: Justin Dearing > To: NYPHP

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Joseph Crawford
Taken from Zend Framework A Beginners Guide which is the most up to date book about Zend Framework which targets ZF 1.10 mysql> CREATE TABLE IF NOT EXISTS user ( -> RecordID INT(4) NOT NULL AUTO_INCREMENT, -> Username VARCHAR(10) NOT NULL, -> Password TEXT NOT NULL, -> PRIMARY KEY (RecordID) -> )

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Greg Rundlett (freephile)
> > > I'm curious if there are any other items people think should be > incorporated into this tutorial. > I think that there have been books like this (For example, a book from 2004 written by George Schlosshnagle: http://www.amazon.com/Advanced-PHP-Programming-George-Schlossnagle/dp/0672325616)

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Mark Armendariz
It seems this might be an unpopular opinion around here, but I think it's a great idea to include all of the above. It teaches that while these things may be optional, the option is to remove them from your process, not to add them. It's important that these ideas are introduced early so that

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Philip Camilleri
Once again, though, Gary, I think you're mixing two separate issues. Details about escaping & sql-injection have no place in sample-code, except in that chapter that has to do with these issues. That said, if you want to write a book about PHP that goes through the lengths of outlining source-cont

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Justin Dearing
Gary, Version control, unit tests, etc are not learning to program. They are learning software engineering. Quite frankly, if you started "Software engineering 101" like this, it would probably add another course between this course and a data structures and algorithms course at a university. Also

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Gary Mort
I personally think that when instructing someone in how to program for a language, one should include good practices - including choosing good data structures for the example code and explaining why they are chosen. That is another issue I have with programming books, they often include some t

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Federico Ulfo
Everybody wants to see fast results, and starting with Hello World is always the best way. Also starting from the basics is good because once you master the logic of OOP and procedural programming you can move from one language to another. About Git and Unit, I agree partially, if you decide to go

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Rukbat
I have to strongly second this. Learning programming means learning algorithms and data structures. Learning the job a programmer does includes version control, unit testing and many other things. Learning a language or ten is one of those other things, but it's not part of learning programm

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread leam hall
Gary, Part of me thinks this is a great idea. Another part of me thinks you're thinking inside the box. Why not have a "How to really program" class where you introduce these topics, functional and OOP, MVC, go over the basics of a few languages, and stuff like that? I would have loved something

Re: [nyphp-talk] Learning to program the right way

2012-01-23 Thread Philip Camilleri
hi Gary, to be honest I would argue that such things as Version Control and Unit Testing do not really belong in a language-specific text-book or tutorial. After all, one does not try to teach program control, binary logic, control and data structures, and the like in a language-specific text-book