• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 22:35
CET 04:35
KST 12:35
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband Information Request Regarding Chinese Ladder SC: Evo Complete - Ranked Ladder OPEN ALPHA
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
Which season is the best in ASL? [ASL20] Ask the mapmakers — Drop your questions BW General Discussion FlaSh's Valkyrie Copium BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread The Perfect Game Path of Exile Nintendo Switch Thread Should offensive tower rushing be viable in RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1330 users

The Big Programming Thread - Page 383

Forum Index > General Forum
Post a Reply
Prev 1 381 382 383 384 385 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
DeltaX
Profile Joined August 2011
United States287 Posts
Last Edited: 2013-10-30 22:22:20
October 30 2013 22:21 GMT
#7641
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt
misirlou
Profile Joined June 2010
Portugal3241 Posts
October 30 2013 22:36 GMT
#7642
On October 31 2013 07:21 DeltaX wrote:
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt


Bottom line, learn javascript and when you need to do server stuff, do it on node.JS. Express + EJS + Database Module (Sqlite3/Mongoose or any other) and it just works like a charm
It's a bit complicated getting your head around all those callbacks but once you realise how to use them and why they are there, it's pretty simple
Yoshi-
Profile Joined October 2008
Germany10227 Posts
October 30 2013 22:39 GMT
#7643
If you have zero programming experience you should use a CMS like joomly,typo3,wordpress everything else would be ridiculous stupid
tofucake
Profile Blog Joined October 2009
Hyrule19167 Posts
October 30 2013 23:39 GMT
#7644
On October 31 2013 07:36 misirlou wrote:
Show nested quote +
On October 31 2013 07:21 DeltaX wrote:
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt


Bottom line, learn javascript and when you need to do server stuff, do it on node.JS. Express + EJS + Database Module (Sqlite3/Mongoose or any other) and it just works like a charm
It's a bit complicated getting your head around all those callbacks but once you realise how to use them and why they are there, it's pretty simple

That's a ridiculous suggestion. Most hosts don't allow node to be run on shared servers in the first place, which will result in either a large increase in cost or a lot of time wasted learning node.
Liquipediaasante sana squash banana
misirlou
Profile Joined June 2010
Portugal3241 Posts
October 31 2013 00:00 GMT
#7645
On October 31 2013 08:39 tofucake wrote:
Show nested quote +
On October 31 2013 07:36 misirlou wrote:
On October 31 2013 07:21 DeltaX wrote:
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt


Bottom line, learn javascript and when you need to do server stuff, do it on node.JS. Express + EJS + Database Module (Sqlite3/Mongoose or any other) and it just works like a charm
It's a bit complicated getting your head around all those callbacks but once you realise how to use them and why they are there, it's pretty simple

That's a ridiculous suggestion. Most hosts don't allow node to be run on shared servers in the first place, which will result in either a large increase in cost or a lot of time wasted learning node.


All hosts don't allow node to be run on shared server, because it can't. However, you can still use hosting like heroku and for free.
tec27
Profile Blog Joined June 2004
United States3702 Posts
October 31 2013 05:09 GMT
#7646
On October 31 2013 08:39 tofucake wrote:
Show nested quote +
On October 31 2013 07:36 misirlou wrote:
On October 31 2013 07:21 DeltaX wrote:
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt


Bottom line, learn javascript and when you need to do server stuff, do it on node.JS. Express + EJS + Database Module (Sqlite3/Mongoose or any other) and it just works like a charm
It's a bit complicated getting your head around all those callbacks but once you realise how to use them and why they are there, it's pretty simple

That's a ridiculous suggestion. Most hosts don't allow node to be run on shared servers in the first place, which will result in either a large increase in cost or a lot of time wasted learning node.

Its not really a large increase in cost, but it does require more knowledge. You can get a pretty decent VPS for $5 a month that will have way less issues than all of the typical shitty shared hosting providers (and let me be clear, *all* shared hosting is shitty, no ifs, ands or buts). But yeah, if you don't have experience setting up a linux box and don't know how to install everything you need, secure the machine, etc. you'd be pretty screwed going that route. I love Node, but its not the right route for someone who's never touched web development before. That path is best served by Rails, or Django or PHP, and PHP is probably the easiest to find on any given host (basically every host will have it installed). I do, however, think PHP is a really shitty language and not very useful to learn, so if you're interested in taking things further then Rails (Ruby) or Django (Python) are much better options.
Can you jam with the console cowboys in cyberspace?
pebble444
Profile Blog Joined March 2011
Italy2499 Posts
October 31 2013 05:46 GMT
#7647
Thank you all for your advice!!

Things are a little bit more clear now as to how to move. Realistically, i am going to set my goal to bulding it with Html. I feel this is an archievable objective, and while it will not allow for a more dinamic site, it will have to do for now. As i said i used html before so i have prior experience to start off from. My goal is to have a personal website, and be able to have some control over the layout. Being somewhat indipendant is good. I have some ideas and the important thing right now is to be able to "materialize them" . I will post a link to it in this thread when it is up and running. Cheers
"Awaken my Child, and embrace the Glory that is your Birthright"
teamamerica
Profile Blog Joined July 2010
United States958 Posts
October 31 2013 05:49 GMT
#7648
On October 31 2013 14:09 tec27 wrote:
Show nested quote +
On October 31 2013 08:39 tofucake wrote:
On October 31 2013 07:36 misirlou wrote:
On October 31 2013 07:21 DeltaX wrote:
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt


Bottom line, learn javascript and when you need to do server stuff, do it on node.JS. Express + EJS + Database Module (Sqlite3/Mongoose or any other) and it just works like a charm
It's a bit complicated getting your head around all those callbacks but once you realise how to use them and why they are there, it's pretty simple

That's a ridiculous suggestion. Most hosts don't allow node to be run on shared servers in the first place, which will result in either a large increase in cost or a lot of time wasted learning node.

Its not really a large increase in cost, but it does require more knowledge. You can get a pretty decent VPS for $5 a month that will have way less issues than all of the typical shitty shared hosting providers (and let me be clear, *all* shared hosting is shitty, no ifs, ands or buts). But yeah, if you don't have experience setting up a linux box and don't know how to install everything you need, secure the machine, etc. you'd be pretty screwed going that route. I love Node, but its not the right route for someone who's never touched web development before. That path is best served by Rails, or Django or PHP, and PHP is probably the easiest to find on any given host (basically every host will have it installed). I do, however, think PHP is a really shitty language and not very useful to learn, so if you're interested in taking things further then Rails (Ruby) or Django (Python) are much better options.


I'm not trying to cause a flame war or promote one language over another, but I'm curious as to why to consider PHP shitty. As a nooby programmer, I'm sure there are things that I just can't see about the language, so that's why I'm asking.

If you were developing a greenfield project, would you consider PHP significantly shittier then Ruby or Python? I say that as someone whose made few small PHP sites (and has also had to work with too much shitty db logic mixed with html snippets mixed with business logic and fix them...) - get some DB data (PDO works fine), allow CRUD operations, maybe scrape some websites using curls (curl_multi lets me at least kinda pull multiple sites at the same time), hash some pws (blowfish is pretty easy now!). I just javascript libraries for most of my view rendering and mostly OO code.

There are times I hate some of the std lib functions for always having their parameters in different orders (needle, haystack - haytack, needle) but with an IDE that looks up functions, that's not an issue for me, and now I can write OO PHP code fine. What are the killer features of Ruby and Python (the languages) that you love? This includes stuff like dependency management and the language tooling in general.

In the context of just web development - as someone who hasn't touched any of the major PHP frameworks e.g. Symfony, Zend, <insert your favorite PHP framework> - are these frameworks significantly less productive then <insert your favorite Ruby/Python framework>? I started the Rails tutorial but wasn't like blown away - maybe the magic came later? They just looked like the PHP framework tutorials I've seen (but again, I could just be blind to the differences)

If I had to pick up a new web framework I'm tempted to learn a Java/Scala/C# one cause I'd like stronger static code analysis + boring enterprise java jobs 4lyfe, but those are just my thoughts.
RIP GOMTV. RIP PROLEAGUE.
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2013-10-31 06:07:48
October 31 2013 06:07 GMT
#7649
On October 31 2013 14:49 teamamerica wrote:
I'm not trying to cause a flame war or promote one language over another, but I'm curious as to why to consider PHP shitty. As a nooby programmer, I'm sure there are things that I just can't see about the language, so that's why I'm asking.


There are many reasons. Here are some of them:

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

The short version of that is an analogy towards the top, worth reposting here:


I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there.

You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes.

You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways.

You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever.

And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And there’s no clear problem with the set as a whole; it still has all the tools.

Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.

That’s what’s wrong with PHP.
Who after all is today speaking about the destruction of the Armenians?
teamamerica
Profile Blog Joined July 2010
United States958 Posts
October 31 2013 06:49 GMT
#7650
On October 31 2013 15:07 phar wrote:
Show nested quote +
On October 31 2013 14:49 teamamerica wrote:
I'm not trying to cause a flame war or promote one language over another, but I'm curious as to why to consider PHP shitty. As a nooby programmer, I'm sure there are things that I just can't see about the language, so that's why I'm asking.


There are many reasons. Here are some of them:

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

The short version of that is an analogy towards the top, worth reposting here:

Show nested quote +

I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there.

You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes.

You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways.

You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever.

And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And there’s no clear problem with the set as a whole; it still has all the tools.

Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.

That’s what’s wrong with PHP.


So that's not the first time I've seen that list. But in my time with PHP, developing on a server I control with an IDE and XDebug enabled, I've not ran into most issues (mostly greenfield development, the shitty code I fix will be shitty wherever).

Maybe that list doesn't convince me because it's like a guy shouting a ton of shit. He makes some points that are valid (fatal errors wtf why do you just die like that; I've personally not had to deal with dependancy issues so I don't know), but a lot of the points raised are fixed in newer versions of PHP (5.3+), contrived (do people really nest ternary shorthand like that), or I just disagree with (he doesn't believe in private/public variables in OO code???). Overall, I see some valid points, but if you're telling me that a hitlist on Rails from version fucking 0.0 till now won't have it's issues, I'd be very suprised.

What I was hoping was issues you had developing with PHP using new OO based frameworks, but I'm guessing you haven't worked with more recent PHP code?

But maybe I'm just one of blind carpeneters whose mind will be blown when I really learn some other framework.
RIP GOMTV. RIP PROLEAGUE.
tec27
Profile Blog Joined June 2004
United States3702 Posts
October 31 2013 07:26 GMT
#7651
On October 31 2013 14:49 teamamerica wrote:
Show nested quote +
On October 31 2013 14:09 tec27 wrote:
On October 31 2013 08:39 tofucake wrote:
On October 31 2013 07:36 misirlou wrote:
On October 31 2013 07:21 DeltaX wrote:
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt


Bottom line, learn javascript and when you need to do server stuff, do it on node.JS. Express + EJS + Database Module (Sqlite3/Mongoose or any other) and it just works like a charm
It's a bit complicated getting your head around all those callbacks but once you realise how to use them and why they are there, it's pretty simple

That's a ridiculous suggestion. Most hosts don't allow node to be run on shared servers in the first place, which will result in either a large increase in cost or a lot of time wasted learning node.

Its not really a large increase in cost, but it does require more knowledge. You can get a pretty decent VPS for $5 a month that will have way less issues than all of the typical shitty shared hosting providers (and let me be clear, *all* shared hosting is shitty, no ifs, ands or buts). But yeah, if you don't have experience setting up a linux box and don't know how to install everything you need, secure the machine, etc. you'd be pretty screwed going that route. I love Node, but its not the right route for someone who's never touched web development before. That path is best served by Rails, or Django or PHP, and PHP is probably the easiest to find on any given host (basically every host will have it installed). I do, however, think PHP is a really shitty language and not very useful to learn, so if you're interested in taking things further then Rails (Ruby) or Django (Python) are much better options.


I'm not trying to cause a flame war or promote one language over another, but I'm curious as to why to consider PHP shitty. As a nooby programmer, I'm sure there are things that I just can't see about the language, so that's why I'm asking.

If you were developing a greenfield project, would you consider PHP significantly shittier then Ruby or Python? I say that as someone whose made few small PHP sites (and has also had to work with too much shitty db logic mixed with html snippets mixed with business logic and fix them...) - get some DB data (PDO works fine), allow CRUD operations, maybe scrape some websites using curls (curl_multi lets me at least kinda pull multiple sites at the same time), hash some pws (blowfish is pretty easy now!). I just javascript libraries for most of my view rendering and mostly OO code.

There are times I hate some of the std lib functions for always having their parameters in different orders (needle, haystack - haytack, needle) but with an IDE that looks up functions, that's not an issue for me, and now I can write OO PHP code fine. What are the killer features of Ruby and Python (the languages) that you love? This includes stuff like dependency management and the language tooling in general.

In the context of just web development - as someone who hasn't touched any of the major PHP frameworks e.g. Symfony, Zend, <insert your favorite PHP framework> - are these frameworks significantly less productive then <insert your favorite Ruby/Python framework>? I started the Rails tutorial but wasn't like blown away - maybe the magic came later? They just looked like the PHP framework tutorials I've seen (but again, I could just be blind to the differences)

If I had to pick up a new web framework I'm tempted to learn a Java/Scala/C# one cause I'd like stronger static code analysis + boring enterprise java jobs 4lyfe, but those are just my thoughts.

The link phar gave is decent, but I guess I'll summarize my personal views as well. Firstly, I don't use Ruby or Python on a daily basis, so I'm not really going to try to argue with anyone about how they're better for web development. They are merely the choices with the A) largest amount of noob-friendly documentation and B) large, well-maintained and used web frameworks. I use Java (Android) at work [and hate Java with a passion], and Javascript for basically everything in my free time, but I've also written a lot of code in C#, C, C++, Delphi, and PHP, along with a small amount in Ruby and Python.

PHP is a bad language to learn for beginners because of many reasons. First, there's a ridiculous amount of bad documentation, bad tutorials, and bad advice. PHP at this point has certainly "grown up" somewhat, but if you search for how to do something in PHP, its very likely you're going to find some horrible code somewhere that uses libraries that are completely frowned upon/maybe deprecated if you're lucky, and as a beginner you're going to have no way of figuring out that its wrong. And when you look at the next search result it'll be using the same thing, so it must be right! But its not. Sure, other languages have their fair share of bad, outdated advice; I know Javascript certainly does and its frustrating. But PHP stands out by far as the language with the worst examples on the Internet in my mind, and that alone makes it a bad choice for someone who lacks experience.

Next, you have PHP's standard library. PHP's standard library is extensive, and all documented on php.net to at least some extent (when its not being infected with malware and claiming its a false positive ). But its also full of a ridiculous number of quirks, of tons of libraries that do the same thing in subtly different ways, wildly inconsistent style, and way too many choices for a beginner. People that lack experience would do much better with a language that has a consistent, simple standard library that they can pick up quickly.

Lastly, there's the language itself. PHP has some really baffling semantics (e.g. foreach behavior), especially when you start getting into things that were obviously never intended back when Rasmus Lerdorf just wanted a replacement for perl for his personal website. Beginners may not run into these things often, but when they do, they'll be completely unequipped to figure out what's going on. Add to that the completely frustrating syntax error handling, and you have a recipe for PHP development being pretty non-enjoyable.

Since you may wonder why I hate PHP but love JS, since they both have baffling semantics at times and similarly bad examples throughout the web: I don't view Javascript as a wonderful language for beginners. I think Javascript can be a good choice, given that any person who runs a decently modern browser is just a couple keystrokes from a powerful REPL and the ability to interact with content throughout the web, but it certainly has its fair share of confusing elements and behavior. Overall, I like JS because it is semantically simple, for the most part, and incredibly flexible. JS offers little in the way of data structures, OO implementation, etc. but offers a ton in the way of molding it and using it how you wish. There's very little in the language that is "sacred", and you can modify and reproduce almost all of the behavior of the built-in types. Node continues the JS simplicity, offering a very minimal standard library and allowing you to pick and choose from a huge library of packages to get what you want. NPM (Node's package manager) is simple and awesome, and definitely the best package manager I have come across for a platform.

PHP, on the other hand, feels very much like something thrown together by people who didn't really realize the full implications of their choices. Its way too big for what it is, there's tons of stuff it accomplishes in C that you could never hope to do in actual PHP code, and tons of stuff is implemented in inconsistent and unexpected ways. Overall, its a very bewildering language to use, and doesn't even give you a great deal of power in exchange for your sanity. I don't think there is ever a project I would say PHP is the best choice for.
Can you jam with the console cowboys in cyberspace?
teamamerica
Profile Blog Joined July 2010
United States958 Posts
October 31 2013 07:42 GMT
#7652
On October 31 2013 16:26 tec27 wrote:
Show nested quote +
On October 31 2013 14:49 teamamerica wrote:
On October 31 2013 14:09 tec27 wrote:
On October 31 2013 08:39 tofucake wrote:
On October 31 2013 07:36 misirlou wrote:
On October 31 2013 07:21 DeltaX wrote:
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt


Bottom line, learn javascript and when you need to do server stuff, do it on node.JS. Express + EJS + Database Module (Sqlite3/Mongoose or any other) and it just works like a charm
It's a bit complicated getting your head around all those callbacks but once you realise how to use them and why they are there, it's pretty simple

That's a ridiculous suggestion. Most hosts don't allow node to be run on shared servers in the first place, which will result in either a large increase in cost or a lot of time wasted learning node.

Its not really a large increase in cost, but it does require more knowledge. You can get a pretty decent VPS for $5 a month that will have way less issues than all of the typical shitty shared hosting providers (and let me be clear, *all* shared hosting is shitty, no ifs, ands or buts). But yeah, if you don't have experience setting up a linux box and don't know how to install everything you need, secure the machine, etc. you'd be pretty screwed going that route. I love Node, but its not the right route for someone who's never touched web development before. That path is best served by Rails, or Django or PHP, and PHP is probably the easiest to find on any given host (basically every host will have it installed). I do, however, think PHP is a really shitty language and not very useful to learn, so if you're interested in taking things further then Rails (Ruby) or Django (Python) are much better options.


I'm not trying to cause a flame war or promote one language over another, but I'm curious as to why to consider PHP shitty. As a nooby programmer, I'm sure there are things that I just can't see about the language, so that's why I'm asking.

If you were developing a greenfield project, would you consider PHP significantly shittier then Ruby or Python? I say that as someone whose made few small PHP sites (and has also had to work with too much shitty db logic mixed with html snippets mixed with business logic and fix them...) - get some DB data (PDO works fine), allow CRUD operations, maybe scrape some websites using curls (curl_multi lets me at least kinda pull multiple sites at the same time), hash some pws (blowfish is pretty easy now!). I just javascript libraries for most of my view rendering and mostly OO code.

There are times I hate some of the std lib functions for always having their parameters in different orders (needle, haystack - haytack, needle) but with an IDE that looks up functions, that's not an issue for me, and now I can write OO PHP code fine. What are the killer features of Ruby and Python (the languages) that you love? This includes stuff like dependency management and the language tooling in general.

In the context of just web development - as someone who hasn't touched any of the major PHP frameworks e.g. Symfony, Zend, <insert your favorite PHP framework> - are these frameworks significantly less productive then <insert your favorite Ruby/Python framework>? I started the Rails tutorial but wasn't like blown away - maybe the magic came later? They just looked like the PHP framework tutorials I've seen (but again, I could just be blind to the differences)

If I had to pick up a new web framework I'm tempted to learn a Java/Scala/C# one cause I'd like stronger static code analysis + boring enterprise java jobs 4lyfe, but those are just my thoughts.

The link phar gave is decent, but I guess I'll summarize my personal views as well. Firstly, I don't use Ruby or Python on a daily basis, so I'm not really going to try to argue with anyone about how they're better for web development. They are merely the choices with the A) largest amount of noob-friendly documentation and B) large, well-maintained and used web frameworks. I use Java (Android) at work [and hate Java with a passion], and Javascript for basically everything in my free time, but I've also written a lot of code in C#, C, C++, Delphi, and PHP, along with a small amount in Ruby and Python.

PHP is a bad language to learn for beginners because of many reasons. First, there's a ridiculous amount of bad documentation, bad tutorials, and bad advice. PHP at this point has certainly "grown up" somewhat, but if you search for how to do something in PHP, its very likely you're going to find some horrible code somewhere that uses libraries that are completely frowned upon/maybe deprecated if you're lucky, and as a beginner you're going to have no way of figuring out that its wrong. And when you look at the next search result it'll be using the same thing, so it must be right! But its not. Sure, other languages have their fair share of bad, outdated advice; I know Javascript certainly does and its frustrating. But PHP stands out by far as the language with the worst examples on the Internet in my mind, and that alone makes it a bad choice for someone who lacks experience.

Next, you have PHP's standard library. PHP's standard library is extensive, and all documented on php.net to at least some extent (when its not being infected with malware and claiming its a false positive ). But its also full of a ridiculous number of quirks, of tons of libraries that do the same thing in subtly different ways, wildly inconsistent style, and way too many choices for a beginner. People that lack experience would do much better with a language that has a consistent, simple standard library that they can pick up quickly.

Lastly, there's the language itself. PHP has some really baffling semantics (e.g. foreach behavior), especially when you start getting into things that were obviously never intended back when Rasmus Lerdorf just wanted a replacement for perl for his personal website. Beginners may not run into these things often, but when they do, they'll be completely unequipped to figure out what's going on. Add to that the completely frustrating syntax error handling, and you have a recipe for PHP development being pretty non-enjoyable.

Since you may wonder why I hate PHP but love JS, since they both have baffling semantics at times and similarly bad examples throughout the web: I don't view Javascript as a wonderful language for beginners. I think Javascript can be a good choice, given that any person who runs a decently modern browser is just a couple keystrokes from a powerful REPL and the ability to interact with content throughout the web, but it certainly has its fair share of confusing elements and behavior. Overall, I like JS because it is semantically simple, for the most part, and incredibly flexible. JS offers little in the way of data structures, OO implementation, etc. but offers a ton in the way of molding it and using it how you wish. There's very little in the language that is "sacred", and you can modify and reproduce almost all of the behavior of the built-in types. Node continues the JS simplicity, offering a very minimal standard library and allowing you to pick and choose from a huge library of packages to get what you want. NPM (Node's package manager) is simple and awesome, and definitely the best package manager I have come across for a platform.

PHP, on the other hand, feels very much like something thrown together by people who didn't really realize the full implications of their choices. Its way too big for what it is, there's tons of stuff it accomplishes in C that you could never hope to do in actual PHP code, and tons of stuff is implemented in inconsistent and unexpected ways. Overall, its a very bewildering language to use, and doesn't even give you a great deal of power in exchange for your sanity. I don't think there is ever a project I would say PHP is the best choice for.


Hey tec, thanks for the detailed reply. Somehow even though you touched on some of the same points as the linked blog, I found myself agreeing more strongly with you - maybe because I didn't find myself just disagreeing with a lot of the points you made. The quote you had at the end made me really consider what I'm doing with PHP, that PHP 'doesn't even give you a great deal of power in exchange for your sanity'. I wouldn't consider myself losing my sanity, but I'm not doing anything too complicated in PHP and I don't see myself ever doing something too complicated with the language, while when I write Java (the only other language I've written more then trivial code in), I feel like I can accomplish nontrivial tasks.
RIP GOMTV. RIP PROLEAGUE.
tec27
Profile Blog Joined June 2004
United States3702 Posts
October 31 2013 08:01 GMT
#7653
Use what you like, but don't be afraid to try out different languages and stuff. Like I said, I've written PHP, I used to use it for most everything I put on the web back when I was 15-16 (mind you, that was 8-9 years ago, there weren't many other choices really ). Its certainly not going to prevent you from moving on to other things. If you feel like you can accomplish more interesting stuff in Java, maybe you should try writing some of your web stuff there.

Also, you seem to mention frameworks a lot, I'd encourage you to not think about things in terms of frameworks. Try writing a simple HTTP server, then step back and look at how your implementation works in comparison to a common PHP stack, or Rails stack, or what have you. Think about why they do things in the way they do, what advantages/disadvantages that gives them. If/when you choose a framework, you want to choose it not because you couldn't implement the same thing yourself, but because it gives you something you couldn't easily get yourself (e.g. more people thinking about/fixing security issues, better compatibility/easier interoperability with libraries, etc.). Its way better to know how the web works and be able to understand a framework based on that, than to know how a framework works and try to derive how the web works from there. (This advice doesn't really apply to beginners, since the framework is there to abstract things they aren't ready to understand, but I think implementing and HTTP server/client is a really good learning tool otherwise)
Can you jam with the console cowboys in cyberspace?
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-11-01 02:59:56
November 01 2013 02:58 GMT
#7654
On October 31 2013 14:49 teamamerica wrote:
Show nested quote +
On October 31 2013 14:09 tec27 wrote:
On October 31 2013 08:39 tofucake wrote:
On October 31 2013 07:36 misirlou wrote:
On October 31 2013 07:21 DeltaX wrote:
I would suggest that you actually write something before you go spend money on web hosting (or a domain name).

If you are starting out with zero programming experience, I would first just do something basic with just html/css. Next you would likely need to learn an actual programming language. Most modern sites have some javascript running in the browser and something running on a server that will serve the pages and can send information to the javascript.

As a rule of thumb:

If you want exactly the same pages for everyone all the time, you only need to know html/css.
If you want pages to change based on some user input or anything else, you need some logic somewhere (on server or javascript)
If you want pages to be able to change based on user input without reloading the whole page, you need to know javascipt


Bottom line, learn javascript and when you need to do server stuff, do it on node.JS. Express + EJS + Database Module (Sqlite3/Mongoose or any other) and it just works like a charm
It's a bit complicated getting your head around all those callbacks but once you realise how to use them and why they are there, it's pretty simple

That's a ridiculous suggestion. Most hosts don't allow node to be run on shared servers in the first place, which will result in either a large increase in cost or a lot of time wasted learning node.

Its not really a large increase in cost, but it does require more knowledge. You can get a pretty decent VPS for $5 a month that will have way less issues than all of the typical shitty shared hosting providers (and let me be clear, *all* shared hosting is shitty, no ifs, ands or buts). But yeah, if you don't have experience setting up a linux box and don't know how to install everything you need, secure the machine, etc. you'd be pretty screwed going that route. I love Node, but its not the right route for someone who's never touched web development before. That path is best served by Rails, or Django or PHP, and PHP is probably the easiest to find on any given host (basically every host will have it installed). I do, however, think PHP is a really shitty language and not very useful to learn, so if you're interested in taking things further then Rails (Ruby) or Django (Python) are much better options.


I'm not trying to cause a flame war or promote one language over another, but I'm curious as to why to consider PHP shitty. As a nooby programmer, I'm sure there are things that I just can't see about the language, so that's why I'm asking.

If you were developing a greenfield project, would you consider PHP significantly shittier then Ruby or Python? I say that as someone whose made few small PHP sites (and has also had to work with too much shitty db logic mixed with html snippets mixed with business logic and fix them...) - get some DB data (PDO works fine), allow CRUD operations, maybe scrape some websites using curls (curl_multi lets me at least kinda pull multiple sites at the same time), hash some pws (blowfish is pretty easy now!). I just javascript libraries for most of my view rendering and mostly OO code.

There are times I hate some of the std lib functions for always having their parameters in different orders (needle, haystack - haytack, needle) but with an IDE that looks up functions, that's not an issue for me, and now I can write OO PHP code fine. What are the killer features of Ruby and Python (the languages) that you love? This includes stuff like dependency management and the language tooling in general.

In the context of just web development - as someone who hasn't touched any of the major PHP frameworks e.g. Symfony, Zend, <insert your favorite PHP framework> - are these frameworks significantly less productive then <insert your favorite Ruby/Python framework>? I started the Rails tutorial but wasn't like blown away - maybe the magic came later? They just looked like the PHP framework tutorials I've seen (but again, I could just be blind to the differences)

If I had to pick up a new web framework I'm tempted to learn a Java/Scala/C# one cause I'd like stronger static code analysis + boring enterprise java jobs 4lyfe, but those are just my thoughts.


Simply put PHP is a half finished language. It really doesn't do anything well, it has bad OO support, no functional programming, poorly written libraries, lack of support for native code, is a pain to setup without an all-in-one installer, has archaic server configuration, and no package management framework. And last but not least, the syntax is ugly as all hell.

OO is the main thing, compare CakePHP to Rails, its not even close. Unfortunately Cake is not even capable of doing any of the cool things any Ruby framework can do because PHP is so bad. The ODM in Cake is a freaking nightmare but that's the best they can do because... PHP.

Being able to substitute libraries or even entire Ruby versions within seconds is a thing of beauty. No other system works as well as Ruby+RVM+Bundler. Bundler allows me to hack up a very nice looking website in days in the exact configuration I want. e.g Bundle Bootstrap, Sinatra, Mongo, Slim, Sass, Coffeescript. Run a few scaffolds done! -> That's half my website done already, and I have some nice preprocessors to do all my front-end development really nicely.

Being able to do my HTML like this
http://slim-lang.com/

My CSS like this
http://sass-lang.com/guide

My javascript like this
http://coffeescript.org/

My tests like this
http://cukes.info/

And that would all get set up with 4 lines in a Gemfile, passed around in your source control which makes it extremely easy for everyone in your development team to get setup with the right libraries instantly.

To do that in PHP would be an absolute pain or just plain isn't available.

Lets say I am forced to choose a more mature framework (e.g switch from MongoDB+Padrino to SQL+Rails), its extremely easy. In PHP imagine switching from Cake to Zend, not even worth it.

I'm not even mentioning how great Ruby is as a language on its own as well.

Django and Node are still very immature as far as I'm concerned, although they are catching up to Ruby very quickly by copying a lot of its features (not saying its a bad thing, but that is what they are doing). e.g NPM -> Rubygems, although they are is still no where near as good as their ruby counterparts (yet).

Source: I have years of experience with PHP, Ruby, Node, Python
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
tec27
Profile Blog Joined June 2004
United States3702 Posts
November 01 2013 04:45 GMT
#7655
NPM is copying gems? I think you mean CPAN. And NPM already has a larger library of packages than Rubygems by a factor of 10, so, you know
Can you jam with the console cowboys in cyberspace?
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-11-01 06:25:18
November 01 2013 06:21 GMT
#7656
On November 01 2013 13:45 tec27 wrote:
NPM is copying gems? I think you mean CPAN. And NPM already has a larger library of packages than Rubygems by a factor of 10, so, you know


Hmmm, it really didn't seem to be the case when I used node.

If it does, it definitely doesn't have the variety that Ruby has. NPM also doesn't work nearly as well as Rubygems especially when it comes to native code, many packages also depend on the NPM version which is a pain, and the libraries are by default installed in the source directory which doesn't make a lot of sense.

Lets face it, I doubt NPM would be around if it wasn't for Rubygems. Node is trying really hard to copy Ruby 1 for 1, half the node modules are just ports of ruby modules, there aren't that many unique ones (the only ones that I can think of off the top of my head are stylus and zombie which I really liked). Creating gems is also a piece of piss compared to CPAN.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
tec27
Profile Blog Joined June 2004
United States3702 Posts
Last Edited: 2013-11-01 07:13:32
November 01 2013 07:13 GMT
#7657
What's the last version of Node you used? Native library support has been fine ever since the introduction of node-gyp, which was around 0.6 or so (so like, over a year ago). Pretty much no packages depend on a specific NPM version, so I'm not really sure where you're getting that from, and NPM is installed as part of node, so its not likely people aren't going to be on relatively similar versions. Modules being installed in the source directory is a *feature*, a very valuable one, I'm not sure why you would complain about that. Having a global repository for all the modules you use throughout all of the code on your computer is a recipe for disaster. By keeping modules local to the place where they are used (and recursively so), you ensure that each module gets the things it was expecting, at the versions it was expecting, every time. Its not perfect, but no system is. Its far preferable from needing to create a virtual-env to keep everything separate or install things without root permissions, and it also allows you to check your dependencies into version control for deployable applications, which makes for much easier bisecting to find regression causes.

NPM and all of the other Node package managers that came before it would certainly have existed without Rubygems. The point of my previous reply was to demonstrate that you were being revisionist: CPAN has been around and hugely popular for far longer than gems. It is the package management system that all other language's systems strive to be. Period. Any decently productive language nowadays basically *has* to have a package management system: NPM for Node, `go get` for golang, Nuget for C#, the list goes on. You can't honestly believe they're all "copying Ruby" just because they see value in making reusable modules easy to download, install and use.

Node is also not copying Ruby in the least. I'm not even sure how I can take you seriously if you try to state that there "aren't many unique node modules." Did you like search through a list of all the node modules in existence and check off the ones that were "copies of Ruby modules?" All 45,000 of them? I don't really care if you make recommendations or give advice or commentary about things you have knowledge of, but this is like the 4th or 5th time you've tried to tell someone that you're experienced in Node, when you clearly have no idea wtf you're talking about. Just stop.
Can you jam with the console cowboys in cyberspace?
Manit0u
Profile Blog Joined August 2004
Poland17490 Posts
Last Edited: 2013-11-01 07:31:16
November 01 2013 07:27 GMT
#7658
Guys, a quick question for you. Do you know how to make the <footer> stick to the bottom of the page in HTML/CSS without reverting to putting everything into a big content-wrapper <div> and setting position: absolute; bottom: 0; to the <footer>?

I'm trying to make a fairly simple page and it's important that it follows a clear logic structure:

<header> (top of page, with <nav> section etc.)
<article> (actual page content)
<footer> (bottom of the page, copyright, site map etc.)

For some reason, if I won't wrap everything into one big <div> with height: 100% etc. the <footer> will overlap with <article> section and display itself in the middle of the page. It's driving me nuts.

+ Show Spoiler [HTML] +


<!DOCTYPE html>
<html>

<head>
<title>Some Simple Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="styles/site.css"/>
</head>

<body>

<div class="content-wrapper">

<header>

<img src="images/logo.png" class="logo">

<nav id="menu">
<ul>
<li><a class="active" href="#">Menu</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">Staff</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>

<h1 class="title">Some Simple Website</h1>

</header>

<article>
<ul>
<li><h2>About Us</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Gallery</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Staff</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Contact</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<footer>

<ul>
<li><h3>&copy; 2013</h3></li>
<li><h3>Author: John Doe</h3></li>
</ul>

<nav>
<ul>
<li><a href="#">Back to Top</a></li>
<li><a href="#">Site Map</a></li>
</ul>
</nav>

</footer>

</div><!-- .contnet-wrapper -->

</body>

</html>



+ Show Spoiler [CSS] +


html, body {
width: 100%;
height: auto;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}

header {
width: 1000px;
height: 200px;
margin: 20px auto 50px auto;
border-bottom: 1px solid #E7E7E7;
display: block;
}

footer {
width: 1000px;
height: 70px;
position: absolute;
bottom: 0;
border-top: 1px solid #E7E7E7;
}

footer nav {
height: 40px;
}

footer nav ul, footer ul, #menu ul, article ul {
list-style: none outside none;
padding: 0;
margin: 0;
}

footer nav li, footer li {
display: inline-block;
width: 300px;
position: relative;
float: left;
margin-left: 200px;
}

footer h3 {
font: 12px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
}

footer nav a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
}

footer nav a:hover {
color: #20ADA1;
}

.content-wrapper {
width: 1000px;
min-height: 100%;
height: auto;
margin: 0 auto;
display: block;
}

article {
width: 500px;
height: 300px;
margin: 0;
display: inline-block;
float: left;
}

article h2 {
font: 25px bold Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
}

article p {
font: 14px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
text-indent: 20px;
width: 400px;
}

article a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
display: block;
float: right;
position: relative;
margin-right: 50px;
}

article a:hover {
color: #20ADA1;
}

img.logo {
width: 200px;
height: 200px;
margin-left: 30px;
display: inline-block;
float: left;
position: relative;
}

#menu {
width: 510px;
height: 40px;
margin-top: 60px;
margin-left: 200px;
border-bottom: 1px solid #E7E7E7;
display: inline-block;
float: left;
position: relative;
}

#menu li {
display: inline;
}

#menu a {
font: 20px bold Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
letter-spacing: 1px;
margin-left: 10px;
margin-right: 10px;
}

#menu a.active {
color: #20ADA1;
}

#menu a:hover {
color: #20ADA1;
padding-bottom: 15px;
border-bottom: 5px solid #20ADA1;
}

h1.title {
font: 36px bold large Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
height: 45px;
width: 450px;
margin-left: 220px;
margin-top: 25px;
display: inline-block;
float: left;
position: relative;
}



Note: The above code is still very early in the works, so it's not very clean
Time is precious. Waste it wisely.
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-11-01 08:15:15
November 01 2013 08:05 GMT
#7659
On November 01 2013 16:13 tec27 wrote:
What's the last version of Node you used? Native library support has been fine ever since the introduction of node-gyp, which was around 0.6 or so (so like, over a year ago). Pretty much no packages depend on a specific NPM version, so I'm not really sure where you're getting that from, and NPM is installed as part of node, so its not likely people aren't going to be on relatively similar versions. Modules being installed in the source directory is a *feature*, a very valuable one, I'm not sure why you would complain about that. Having a global repository for all the modules you use throughout all of the code on your computer is a recipe for disaster. By keeping modules local to the place where they are used (and recursively so), you ensure that each module gets the things it was expecting, at the versions it was expecting, every time. Its not perfect, but no system is. Its far preferable from needing to create a virtual-env to keep everything separate or install things without root permissions, and it also allows you to check your dependencies into version control for deployable applications, which makes for much easier bisecting to find regression causes.

NPM and all of the other Node package managers that came before it would certainly have existed without Rubygems. The point of my previous reply was to demonstrate that you were being revisionist: CPAN has been around and hugely popular for far longer than gems. It is the package management system that all other language's systems strive to be. Period. Any decently productive language nowadays basically *has* to have a package management system: NPM for Node, `go get` for golang, Nuget for C#, the list goes on. You can't honestly believe they're all "copying Ruby" just because they see value in making reusable modules easy to download, install and use.

Node is also not copying Ruby in the least. I'm not even sure how I can take you seriously if you try to state that there "aren't many unique node modules." Did you like search through a list of all the node modules in existence and check off the ones that were "copies of Ruby modules?" All 45,000 of them? I don't really care if you make recommendations or give advice or commentary about things you have knowledge of, but this is like the 4th or 5th time you've tried to tell someone that you're experienced in Node, when you clearly have no idea wtf you're talking about. Just stop.


Wow chill out dude, you are taking this very personally.

I'm not saying its a bad thing, I'm just stating that that is what is happening, I'm not really fussed. I like Node.

I'm using Node right now for regression testing in a professional environment and all my claims are due to experience.

(hell I even suggested using it when we needed a continuous integration framework set up)

Firstly, I don't use Ruby or Python on a daily basis, so I'm not really going to try to argue with anyone about how they're better for web development.


So you said yourself that you don't really use Ruby, so how would you know?

I can say these things because I use both, how would you know that there aren't heaps of carbon copies of Ruby gems if you haven't used both?

Pretty much the typical stacks for Node websites are very similar to Ruby, you cannot say that of other languages.

You make a website using Jade, Stylus, Coffeescript, Jasmine, Zombie, Cucumber, Sinatra.

Jade is basically Slim, Stylus is basically Sass, Jasmine is a clone of Rspec, everything else bar Zombie is a carbon copy of the Ruby version with JS on the end of it. There was no predecessor for the Ruby versions of those libraries either.

I did mention that there are some Node modules that I like that aren't in Ruby in the above post, but there are a lot of copies, and there is no denying it, and I'm not saying its a bad thing.

Pretty much no packages depend on a specific NPM version, so I'm not really sure where you're getting that from, and NPM is installed as part of node, so its not likely people aren't going to be on relatively similar versions.


I had to update NPM a few weeks ago because Karma depended on a newer version of NPM (it literally wouldn't let me install Karma stating that it required a later version of NPM). I've experienced this plenty of times. This ends here.

Modules being installed in the source directory is a *feature*, a very valuable one, I'm not sure why you would complain about that. Having a global repository for all the modules you use throughout all of the code on your computer is a recipe for disaster. By keeping modules local to the place where they are used (and recursively so), you ensure that each module gets the things it was expecting, at the versions it was expecting, every time. Its not perfect, but no system is.


Bundler gives you the option of doing it exactly the way NPM does it. You can even force other users of your repository to do it this way, or if your production environment does not support Rubygems, but nobody uses it because its a PITA. If it was as good as you said it was, and the alternate was a recipe for disaster, then why isn't anybody using that widely accessible feature for Ruby?

However global libraries is not well supported well in NPM, maybe that's why you think its a recipe for disaster? But if done well, its amazing, ala Bundler/Rubygems.

I do not want to clone a repository with all the libraries source code bundled with it, when I already have the libraries. If you are really concerned about people not using the latest update, put in a version lock in the Gemfile, it is not a "recipe for disaster" and works much better than NPM (In My Humble Opinion). The lockfile by default already handles all of this for you anyway if you're lazy.

Trust me, when you've worked on the same language for years you pretty much have every library out there updated to the latest version. I see no point in having to,
1. Spend ages downloading libraries I already have
2. Keep 5 copies of the same library up to date because I have 5 repositories with the same library, I'd rather just update the one.
3. Waste valuable hard drive space, because every KB matters K? Actually I just wanted a #3 because the list looks weird with only 2 points.

I get this is a matter of preference, but saying it is a recipe for disaster when Rubygems is a much more mature system of which I have had literally 0 problems with in 4 different companies makes you more biased than I am. You don't even use it, at least I use Node.

The 4th or 5th time? Was this when I was talking about concurrent and asynchronous programming which is inherent in Node and arguing against people who said Node should be taught for beginners?

Its been months and still no one has come up with a single good answer to this, except "blah blah you're wrong you know nothing about Node shutup". So where's the counter argument?

Maybe I will quote you on something you said which may bring in some perspective

PHP is a bad language to learn for beginners because of many reasons. First, there's a ridiculous amount of bad documentation, bad tutorials, and bad advice. PHP at this point has certainly "grown up" somewhat, but if you search for how to do something in PHP, its very likely you're going to find some horrible code somewhere that uses libraries that are completely frowned upon/maybe deprecated if you're lucky, and as a beginner you're going to have no way of figuring out that its wrong.


And this... is exactly my problem with Node. Most people using nor teaching Node aren't actually using it correctly which is why it shouldn't be taught for beginners. A lot of node websites run slow as shit because they are doing synchronous programming in an asynchronous environment.

You made this quote so you should be able to see where I am getting at, and if you can't see that for yourself, well that's a problem.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
sob3k
Profile Blog Joined August 2009
United States7572 Posts
November 01 2013 08:17 GMT
#7660
On November 01 2013 16:27 Manit0u wrote:
Guys, a quick question for you. Do you know how to make the <footer> stick to the bottom of the page in HTML/CSS without reverting to putting everything into a big content-wrapper <div> and setting position: absolute; bottom: 0; to the <footer>?

I'm trying to make a fairly simple page and it's important that it follows a clear logic structure:

<header> (top of page, with <nav> section etc.)
<article> (actual page content)
<footer> (bottom of the page, copyright, site map etc.)

For some reason, if I won't wrap everything into one big <div> with height: 100% etc. the <footer> will overlap with <article> section and display itself in the middle of the page. It's driving me nuts.

+ Show Spoiler [HTML] +


<!DOCTYPE html>
<html>

<head>
<title>Some Simple Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="styles/site.css"/>
</head>

<body>

<div class="content-wrapper">

<header>

<img src="images/logo.png" class="logo">

<nav id="menu">
<ul>
<li><a class="active" href="#">Menu</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">Staff</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>

<h1 class="title">Some Simple Website</h1>

</header>

<article>
<ul>
<li><h2>About Us</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Gallery</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Staff</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Contact</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<footer>

<ul>
<li><h3>&copy; 2013</h3></li>
<li><h3>Author: John Doe</h3></li>
</ul>

<nav>
<ul>
<li><a href="#">Back to Top</a></li>
<li><a href="#">Site Map</a></li>
</ul>
</nav>

</footer>

</div><!-- .contnet-wrapper -->

</body>

</html>



+ Show Spoiler [CSS] +


html, body {
width: 100%;
height: auto;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}

header {
width: 1000px;
height: 200px;
margin: 20px auto 50px auto;
border-bottom: 1px solid #E7E7E7;
display: block;
}

footer {
width: 1000px;
height: 70px;
position: absolute;
bottom: 0;
border-top: 1px solid #E7E7E7;
}

footer nav {
height: 40px;
}

footer nav ul, footer ul, #menu ul, article ul {
list-style: none outside none;
padding: 0;
margin: 0;
}

footer nav li, footer li {
display: inline-block;
width: 300px;
position: relative;
float: left;
margin-left: 200px;
}

footer h3 {
font: 12px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
}

footer nav a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
}

footer nav a:hover {
color: #20ADA1;
}

.content-wrapper {
width: 1000px;
min-height: 100%;
height: auto;
margin: 0 auto;
display: block;
}

article {
width: 500px;
height: 300px;
margin: 0;
display: inline-block;
float: left;
}

article h2 {
font: 25px bold Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
}

article p {
font: 14px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
text-indent: 20px;
width: 400px;
}

article a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
display: block;
float: right;
position: relative;
margin-right: 50px;
}

article a:hover {
color: #20ADA1;
}

img.logo {
width: 200px;
height: 200px;
margin-left: 30px;
display: inline-block;
float: left;
position: relative;
}

#menu {
width: 510px;
height: 40px;
margin-top: 60px;
margin-left: 200px;
border-bottom: 1px solid #E7E7E7;
display: inline-block;
float: left;
position: relative;
}

#menu li {
display: inline;
}

#menu a {
font: 20px bold Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
letter-spacing: 1px;
margin-left: 10px;
margin-right: 10px;
}

#menu a.active {
color: #20ADA1;
}

#menu a:hover {
color: #20ADA1;
padding-bottom: 15px;
border-bottom: 5px solid #20ADA1;
}

h1.title {
font: 36px bold large Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
height: 45px;
width: 450px;
margin-left: 220px;
margin-top: 25px;
display: inline-block;
float: left;
position: relative;
}



Note: The above code is still very early in the works, so it's not very clean


Why is your footer using absolute positioning? Absolute positioning removes the element from the document flow. If you use relative positioning and put it below the articles it will naturally be pushed to the bottom of the page by them. If you want it to always show at the bottom of the screen then you would used position: fixed.
In Hungry Hungry Hippos there are no such constraints—one can constantly attempt to collect marbles with one’s hippo, limited only by one’s hippo-levering capabilities.
Prev 1 381 382 383 384 385 1032 Next
Please log in or register to reply.
Live Events Refresh
PiGosaur Monday
01:00
#60
PiGStarcraft603
SteadfastSC163
CranKy Ducklings97
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft603
SteadfastSC 163
Nathanias 83
RuFF_SC2 80
StarCraft: Brood War
Artosis 714
Noble 26
Icarus 6
Dota 2
monkeys_forever339
Other Games
summit1g13480
JimRising 678
WinterStarcraft330
C9.Mang0274
ViBE160
Mew2King28
Organizations
Other Games
gamesdonequick1108
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Hupsaiya 77
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki13
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo434
• Stunt269
Other Games
• Scarra1395
Upcoming Events
Wardi Open
8h 25m
StarCraft2.fi
13h 25m
Replay Cast
20h 25m
The PondCast
1d 6h
OSC
1d 12h
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
1d 20h
Korean StarCraft League
2 days
CranKy Ducklings
3 days
SC Evo League
3 days
BSL 21
3 days
Sziky vs OyAji
Gypsy vs eOnzErG
[ Show More ]
OSC
3 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
4 days
OSC
4 days
BSL 21
4 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
5 days
Wardi Open
5 days
StarCraft2.fi
5 days
Replay Cast
5 days
StarCraft2.fi
6 days
PiGosaur Monday
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.