Posted 14 March 2010 - 01:14 AM (#21)
At the end of the tutorial series, the end result might be a fully functional application of some kind, though a BLOG is almost too simple for something cool, like Hydrogen. If you need some help, let me know.
Posted 14 March 2010 - 08:12 AM (#22)
My fuel behind the concept of starting with OO goes back to the day I started learning Java. With Java, you MUST start with an object or you have nothing to write your code into -- which is pretty obvious if you know java
So I look at all these PHP tutorials, and they seem completely bass-ackwards. They start teach all these little pieces, but mentioning the 'class' keyword is almost always more of an afterthought at the end. Uncool.
Anyway, that's why I want to start with OO from the get-go, and the MVC pattern seems like a good first reason to make separate classes. Even if it's not explained why I'm doing that until later, I know from experience that just making that separation at all will ingrain a habit.
I'm just not sure where to stop with all that and start with Hydrogen. I've been thinking about how I want to do this, and that's my sticking point on every idea I have. I can't teach how to write an MVC application and go over how to use modern database drivers like PDO if the entire 'M' and part of the 'C' is taken over by Hydrogen. Eventually, Hydrogen will take over almost all of the C and V, too ... so I'm not sure whether it would be a good idea to make that tutorial a completely separate thing or not. Any input you might have would be more than welcome :D
Right now I'm leaning toward working my tutorial through an MVC-from-scratch path, then doing something else with Hydrogen later... but that drives me crazy too because I feel like I'm encouraging people to spend a lot of time on their own database engines instead of using the libraries that are already out there for it. Augh!
Posted 15 March 2010 - 11:12 PM (#23)
Kyek, on 14 March 2010 - 08:12 AM, said:
My fuel behind the concept of starting with OO goes back to the day I started learning Java. With Java, you MUST start with an object or you have nothing to write your code into -- which is pretty obvious if you know java
So I look at all these PHP tutorials, and they seem completely bass-ackwards. They start teach all these little pieces, but mentioning the 'class' keyword is almost always more of an afterthought at the end. Uncool.
Anyway, that's why I want to start with OO from the get-go, and the MVC pattern seems like a good first reason to make separate classes. Even if it's not explained why I'm doing that until later, I know from experience that just making that separation at all will ingrain a habit.
I'm just not sure where to stop with all that and start with Hydrogen. I've been thinking about how I want to do this, and that's my sticking point on every idea I have. I can't teach how to write an MVC application and go over how to use modern database drivers like PDO if the entire 'M' and part of the 'C' is taken over by Hydrogen. Eventually, Hydrogen will take over almost all of the C and V, too ... so I'm not sure whether it would be a good idea to make that tutorial a completely separate thing or not. Any input you might have would be more than welcome
Right now I'm leaning toward working my tutorial through an MVC-from-scratch path, then doing something else with Hydrogen later... but that drives me crazy too because I feel like I'm encouraging people to spend a lot of time on their own database engines instead of using the libraries that are already out there for it. Augh!
Kyek, I could not agree more. In my experience, most PHP tutorials and other language tutorials for that matter, tend to throw in Object-Oriented Programming (OOP) into the mix as almost an after thought. The exception to this trend seems to be only C++ tutorials. OOP requires a little bit more effort to learn and develop, but in the long run produces code that is easier to maintain.
Hydrogen is well designed, in my view, but probably a bit cumbersome to be used in a basic tutorial. However, I also concur with your assessment with regards to "encouraging people to spend a lot of time on their own database engines instead of using the libraries that are already out there for it.". One way this might be addressed is to use the relevant portions of Hydrogen in advanced techniques or examples. The simple examples explaining how one might go about writing a PDO driver, providing simple examples using less complete implementations. The advanced portion of a tutorial could then demonstrate those concepts using the Hydrogen library.
These advanced tutorials could be used to produce serious developers, rather than providing overly simple examples that those less serious will simply copy & paste. I cannot count the number of times that I have seen what I like to call "dabblers" copy & paste code, see that it works and call it a day, all without consideration of design, security and maintainability, usually resulting is poorly performing applications or applications that become tomorrows "problem children".
It is my belief that if tutorials were written using OOP and best practices to begin with, a substantial number of those completing the exercises would be less likely to venture into the morass of procedural or inline programming.
Posted 16 March 2010 - 12:23 AM (#24)
I think we if we all posted tutorials, and other helpful/interesting topics, more and more people would join (with of course the help of advertisement)
also an IRC may interest a lot of people (I know you said your working on it.. no rush)
Posted 16 March 2010 - 08:15 AM (#25)
Rob, on 15 March 2010 - 11:12 PM, said:
What a breath of fresh air
I like the beginner vs. advanced approach you suggested, though. A lot of work, but could be really rewarding. I think that what I'm going to do is make three subforums under each language forum:
Tutorials In Progress
- A subforum where people can work on tutorials. Since tutorials tend to be a bit long, I think it would be nice to have a place where folks could work on them gradually without having to save everything in a text editor on their local computer until it's ready to be posted. And this way, people could call out any errors/inaccuracies/etc and make suggestions during the writing process. Plus, the bleeding edge folks can get access to highly-anticipated tutorials before they're 100% finished ;-)
Official Tutorials
- Tutorials that have been approved to be awesome by staff members or other expert-level folk who agree that it's a good teaching tool.
Code Share
- A lot of folks have been posting huge blocks of code with little explanation and calling it a tutorial. While stuff like that is invaluable and a GREAT thing to share with others, I don't consider them tutorials -- a tutorial should cover every line of code and explain what it does and how to use it. So this forum will hold those great code blocks people are sharing
So once those are made, I'll construct my tutorials in the In Progress forum -- so any input you have along the way would be more than welcome
Anyway! As far as projects to show with this tutorial! I have a few ideas that I've been wanting to make on my own for awhile. I figure if I'm doing this, I might as well just document a real process rather than mocking up some minor blog or something. Anyone have any preference?
- One day, there was fmylife.com, and it was great. Then a million sites spun off of that and none of them were useful and most of them were only mildly amusing. I want to take that concept and using it for calling out bullshit from other companies. So anyone can come in, sign up for an account, say "Fuck AT&T!" and provide a story on how AT&T screwed them over. Right now the best tool for this is twitter, and some companies really pay attention there. I think it would be amusing to aggregate all those things into one site. It could even glean the twitter feed for posts there about companies screwing people over.
- I've always wanted to make a non-flash web-based multiplayer game. The online Monopoly thing that ran last year was epic, but I'm not looking to do anything on a scale like that -- I'm thinking more of a turn-based strategy game. Either including all the site's users on the same playing field and turning it into a world-domination sort of thing, or a bunch of 2-4 player games that people can start up with their friends. I envisioned a turn-by-turn Warcraft 3 for that, but I'm not sure that would work out. And it would probably take more graphics chops than I have.
- More and more people are turning to sites like eharmony.com to meet potentially-significant others, but those sites are really terrible. All you have to go on are what people say about themselves and what they say to you in your first few E-mails before you meet. That doesn't often go well. So I envision a more playful site. People have profiles and such just like they would on eHarmony, but there would be activities to get involved in. Just stupid, playful stuff. Limericks where you can only contribute one line. Group drawings, stories, minigames, and everything you do is linked with your profile so that others can go see what your personality is like when you're just goofing around. This might be hard to get older adults involved with, but I don't think anything can convey your personality over the internet better than that can. On the flip side of the coin, though, this could be seen as a really shitty facebook clone with only certain apps. So I'm unsure about this one.
The FML-thing would be easiest, but I'm not sure. Input, please
Posted 16 March 2010 - 10:11 AM (#26)
Kyek, on 16 March 2010 - 08:15 AM, said:
Kyek, on 16 March 2010 - 08:15 AM, said:
Kyek, on 16 March 2010 - 08:15 AM, said:
(There's another similar site that has the members fill up special quizzes and then lets them compare quiz results with other people to see how they match up. The quizzes are special in a sense that you have to give two answers to each question, one answer for yourself, and one answer for what you want your potential partner to pick. ... I went on there with my ex-boyfriend and thanks to that site he is now an ex xD)
Posted 18 March 2010 - 08:38 AM (#28)
dida55, on 18 March 2010 - 08:28 AM, said:
Psst read the thread ;-) There's no Hydrogen tutorial yet, but it's in the works.
And Secretss, thanks for the input
Posted 18 March 2010 - 09:03 AM (#29)
Posted 18 March 2010 - 11:47 AM (#30)
Posted 18 March 2010 - 12:06 PM (#31)
It's one of the reasons i get lazy when writing tutorials since i cant use a formatter or post and see what its going to look like as im going along.
Also Kyek any chance of you generating a PHPDoc for Hydrogen to accompany the next release?
http://www.nspwn.com/
Posted 18 March 2010 - 12:31 PM (#32)
Jordan, on 18 March 2010 - 12:06 PM, said:
lol you've hit a nerve
Unless I'm prototyping or in a rush, I write full Javadoc into all my work -- Java, PHP, or JS -- as I go. Hydrogen started as a prototype AND was a bit rushed, so I'm adding it after the fact. Not a huge deal. Right now about half of it is done, and I'm working on the other half.
Problem is, there's no fucking parser for it. There are three different documentation parsers for PHP and not a single freakin' one of them supports PHP 5.3. I could understand this when PHP was in beta. It was ever-changing, and there's no real need for a tool like that until a language is in full release anyway. But 5.3.2 was just released and there's still *nothing* out there that knows what the hell a namespace is.
So I'm going one of two routes. Either I'm writing the documentation into an HTML format by hand, or I'm writing my own damn PHPDoc-like tool that can handle 5.3. Because seriously, this is all kinds of ridiculous. I understand the challenge behind it -- PHP is very free-form, so no everyone will use folder structures or namespaces in the same way. Personally, my namespaces follow my folder structure exactly and that's how I think everyone should code (not just because I'm biased, but because this is also the structure that's standardized by java, the language which PHP is most based on ;-)), so if I write my own tool, that will probably be one of the initial requirements for others who use it.
So yeah. Some way, some how, there will be decent online navigation of the API ;-)
Posted 18 March 2010 - 06:19 PM (#33)
Kyek, on 18 March 2010 - 12:31 PM, said:
Unless I'm prototyping or in a rush, I write full Javadoc into all my work -- Java, PHP, or JS -- as I go. Hydrogen started as a prototype AND was a bit rushed, so I'm adding it after the fact. Not a huge deal. Right now about half of it is done, and I'm working on the other half.
Problem is, there's no fucking parser for it. There are three different documentation parsers for PHP and not a single freakin' one of them supports PHP 5.3. I could understand this when PHP was in beta. It was ever-changing, and there's no real need for a tool like that until a language is in full release anyway. But 5.3.2 was just released and there's still *nothing* out there that knows what the hell a namespace is.
So I'm going one of two routes. Either I'm writing the documentation into an HTML format by hand, or I'm writing my own damn PHPDoc-like tool that can handle 5.3. Because seriously, this is all kinds of ridiculous. I understand the challenge behind it -- PHP is very free-form, so no everyone will use folder structures or namespaces in the same way. Personally, my namespaces follow my folder structure exactly and that's how I think everyone should code (not just because I'm biased, but because this is also the structure that's standardized by java, the language which PHP is most based on ;-)), so if I write my own tool, that will probably be one of the initial requirements for others who use it.
So yeah. Some way, some how, there will be decent online navigation of the API ;-)
Haha im currently trying to generate PHPDoc's with 'phpDocumentor' and i get where your coming from i thought it was how i was using the tags, some times i get a usable output and others it generates empty documents. Not sure if its how i have it setup or the fact i use the latest php release of the svn. Anyway im glad to here there will be documentation for it
Anyway back to work, hopefully ill get round to writing / finishing a tutorial or two tomorrow.
http://www.nspwn.com/
Posted 18 March 2010 - 11:02 PM (#34)
(I admin this server, drop by, and ask for Ismael!)
Posted 18 March 2010 - 11:35 PM (#35)
Posted 20 March 2010 - 11:34 AM (#37)
Posted 21 March 2010 - 03:12 PM (#38)
So basically,
Webdesign ---> OOPHP ---> Hydrogen!
Edit: I posted according to the conversation on page 1, so I'm not sure if this fits in with the flow of conversation on this page. Just saying in case this post sounds awkward here or anything.
Life = http://xkcd.com
Posted 21 March 2010 - 06:20 PM (#40)
olie122333, on 21 March 2010 - 03:57 PM, said:
Promote tutorial writing by restricting tutorial writing to a small group of people? ;-)






Cartoon Clouds
Mountains
Sunrise
Clouds
Green Clouds
None






















Help