I ended up giving up on this 'forEach' model because it was too confusing to try and manage the captured scope when nesting deeply, plus there is probably a performance hit over normal filtered iterating.

I still like the idea, I just haven't worked everything out lol. Edit: The point I'm trying to get at is that knowing different languages actually seems to influence how I want to do things, rather than just what I'm doing, if that makes sense.

Last edited by Alpo; 08-27-2015 at 06:02 PM.
Reason: what is keyboard?

A lot of other things integrate with Apache. You are just unfortunately another victim of the big mistake that was (L/W)AMP.

But to clarify I'm not an activist. I don't hold any particular anti-PHP point of view. It was an important language in its time and shaped the web in ways that where needed. But it *was*. We have today better designed and better scaled languages for server-side development. So I was hoping that instead of gaining new users, PHP would actually start losing them.

Originally Posted by brewbuck:Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Edit : I've tried Node.JS and it didn't blow my socks off. Sure, I could make a chatroom app in like 30 minutes even with a tutorial and complete ignorance slowing me down but I wasn't impressed. Python looks like it sucks for making a directory. Compare PHP's mkdir() to doing the same in Python. To me there's no contest.

Perl looks okay, I guess, but I'd rather just use PHP instead of Perl.

Edit edit : Though one thing I loved about Node.JS was its support for WebSockets. Like, you can use the Node package manager to install the Socket library and it actually works. I've been looking for that kind of functionality and I'm happy it resides in Node.JS and the npm but at the same time, other aspects don't excite me as much.

I also think the constant use of callback functions does indeed lead to the "callback hell". Hmm... So many decisions... Maybe JSP would be a good choice?

I don't feel comfortable recommending a web development platform. I don't do web development for customers anymore. Only internal stuff. This means that I'm free to choose an option and ignore the rest entirely. So, for instance, I never tested or cared for Node.JS, not knowing whether it is actually any good.

But, from my experience, Python is the way to go if you which a portable open-source community driven web development platform. Python with the Django framework is the best option for quick development of scalable web solutions these days. And I'm not sure what difficulties you are getting with python to make a directory. Something so simple as that may be a clue that you are probably making something wrong.

An added advantage of Python is that it binds very well to numerous user-level languages (including, of course, python). So a knowledge of Python allows you to create a development environment where C++ and Python can coexist nicely, for instance. Also, for more close-to-the-metal server-side code, you may wish to go with Pyramid or Flask frameworks for python. A concept that PHP won't offer you.

An alternative to community-driven web development platforms is Ruby on Rails. I hear also good things from it. But I don't know anything about Ruby.

As for proprietary solutions, the rage is apparently ASP.Net. It allows you to leverage C# and Javascript and it is quite a good development environment. Easy to learn, easy to use and quite powerful. But you are bound to Microsoft whim and moods on how they want to see their web development tools evolve and you ask asking your customers to stick to a commercial operating system with the exclusion of anything else.

EDIT: Of course, there's PHP. Your present choice. Still a viable option for server-side development. But that's a sinking ship. And it's not wise, when trying to come up with a programming career to place your bets on sinking ships. I've seen languages drop their job offerings dramatically in the span of a single year. And if (when, is more appropriate. The writing is on the wall) that happens with PHP you will be left with the problem that you cared for nothing else in the meantime.

EDIT2: I know you are just having fun. But I also know you are serious in your attempt to make a career of programming. So my advice: don't make fun of programming. Be careful. The job market today in this area is ruthless and will spit you out without a care in the world.

Last edited by Mario F.; 08-27-2015 at 10:57 PM.

Originally Posted by brewbuck:Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

If this was about the code phantom posted, I wasn't trying to "make fun" of anything. Like, I think there's a lot to learn there and I do want to learn it but I'd require more explanation.

I was, however, trying to poke fun at how esoteric it looked to someone who is more of a C++ newby. To me, something like a traits class is this weird mind-bending abstraction while to him, he probably knows how to actually make one.

If I came off as a douche to you, Mario, or to you, phantom, I apologize. It's been... an interesting night for me... Don't get married, kids.

</Edit>

And I stopped being so hard on Python. I hate that I have to include an "os" module but it seems like it offers the same supported features so maybe I was a tad hard on it. I think at times I can be a tad scared of the future and that's a fault of mine as a developer. *sigh* I'm sorry.

But the more I read about Node, the more I think it's going to be the language I choose... It also seems like I don't need to rely on Apache anymore either. I used tutorials yesterday that had me writing a HTTP server in Node. Like, what? What?! Plus, that web socket support, man. But now I'm wondering, how do I make the Node HTTP server work through a real DNS? Huh... I guess it's just like Apache in the sense that it's a process listening on a port and awaits a socket connection so it should be no different... How do I make my web server publicly visible?

I swear to God, phantom, we both use C++ but every time I look at your code it feels like we're using a totally different language

O_o

I always work to simplify the expression of my code so as to be more palatable to other people before I post.

You've never actually seen my code.

I know you're a good programmer and way more experienced than me so I desperately want to understand your code but every time I look, I'm just like, "lol wut?"

A lot of the C++ code I post which isn't the expected flavor is just an expression of techniques learned in other programming languages.

The fastest way to learn my C++ would be studying languages that do not readily express the techniques with which you are already familiar.

Man, I thought traits and stuff were as hard as C++ gets... Guess not...

The traits you are referencing are just the foundation.

A trait is really just the condition of branches evaluated during template expansion.

If this was about the code phantom posted, I wasn't trying to "make fun" of anything.

I think the statement was a warning. The market for programmers is, as stated, ruthless. If you really want to "make it", you probably need to give programming for fun a pass; you should be programming to develop your skills if you plan to sell those skills.

Considering the work that some template engine and framework authors put in just so they can avoid using PHP as a template language...

Originally Posted by MutantJohn

And I stopped being so hard on Python. I hate that I have to include an "os" module but it seems like it offers the same supported features so maybe I was a tad hard on it.

O_o

You were not a "tad hard" on Python; you are being irrational.

Originally Posted by Bjarne Stroustrup (2000-10-14)

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.

Moving on, is it not possible to code something fun that also develops my skills?

Phantomotap got it. My meaning was more or less what he thought it was. But I don't mean you shouldn't have fun. Programming can be an emotionally rewarding task. It often is. Instead, I mean you should be more practical about your core decisions and not let fun factor much into it. And one of those core decisions is what languages you should invest your time and your future in.

Originally Posted by MutantJohn

I think project selection is very key here. If something is impractical, it better improve skills.

I wouldn't think so. Almost every incomplete personal project of yours on some solution no one cares about, is still going to help you gain new skills or hone your existing skills. Programming is a continuous learning process and you will remain a "student" for all your career. I will remain forever in awe as to how sometimes even the simplest of projects have forced me into researching new stuff or reveal some weakness I didn't think I had.

More important than what projects you work on, is your knowledge range. The languages and the domains of programming you chose to study and take with you as your programming Knowledge Base.

It is here that fun should not be a factor and you should make more conscious decisions based on current market trends and your own aspirations as a software developer. Once you secure your career, then you will have plenty of free time to have fun on dying, emergent or niche languages or programming paradigms. But for now, as you are trying to build your resume, don't make choices based on how much fun you are having.

Originally Posted by brewbuck:Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.