Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. You use the double colon operator to access static properties.
  2. Not if it's a leap year.
  3. When you downloaded the Win7 RC ISO, why didn't you just pick x64 instead of x86?
  4. That should be just enough to satisfy Firefox' needs.
  5. Rather like this: abstract class Shape { static public function getShape($type) { if (!class_exists($type) || !is_subclass_of($type, __CLASS__)) { throw new InvalidArgumentException('Type must be a valid shape.'); } return new $type; } } class Point extends Shape {} class Circle extends Shape {} var_dump(Shape::getShape('Point')); var_dump(Shape::getShape('Circle')); var_dump(Shape::getShape('foo'));
  6. Then wait with the instantiation until you know which one it is, or maybe create a factory.
  7. If you're running PHP as an Apache module you can add this to a .htaccess file: php_flag register_globals Off Then send an email to your host requesting that they hire competent sysadmins.
  8. Maybe the memory bottleneck is elsewhere in your application. Try to run it through a profiler so you can analyze execution flow of the program.
  9. If you want to do web development, chances are you don't need a CS course. As a web developer, you probably won't care how a compiler works, how the memory is managed on OS kernel level, how a database works (as opposed to how you use a database), how to write multi-threaded programs, what sorting algorithm is best for certain purposes, why a linked list might be better than array (or why it might not), how AI works, how asymmetric encryption works and many of the other things you might learn in CS. PHP is at a much higher abstraction level, and you can easily be a successful PHP developer with a degree in CS. If you want to sort something, you just call sort(). Searching is implemented for you as well. You also have automatic memory management and garbage collection. The kind of math you will have out of a high school will also be sufficient. As far as I'm concerned, computer science is not "just" programming (though many computer scientists end up working as programmers). Programming is a tool in computer science. There are some CS fields that use programming to a significantly lower degree. You might be more interested the users' interaction with the computers, the field of HCI (human-computer interaction) which intersects with psychology as well. The Wii and the EyeToy for Playstation are examples of a TUI (tangible user interface) as opposed to the regular GUI (graphical user interface). Here the user interacts using his own limbs and movements instead of using a virtual cursor via a mouse. Does the user like what he is doing, or is it a pain in the ass? Most people can learn how to program. However, much fewer people know why something works and can justify why they do X instead of Y (or similarly, why X is better than Y in the case of Z). When you're done with a CS degree, you have probably learned a lot of things you will no longer actively think about in your daily life as a programmer, but it should have made you a better programmer nonetheless. Most people can learn the syntax of PHP and get the computer to do something. Especially the wide adoption of things like rapid deployment frameworks it has become much easier. However, as zanus said, someone wrote those frameworks and libraries, someone designed the language you are using and someone wrote a compiler/interpreter for it. But maybe you don't care about those things, which is fine. There is a need for all sorts of people with all sorts of interests. Fortunately, all those different kind of people exist. In short, if you want to do web development, perhaps a CS degree is overkill. Perhaps you would be better off with a vocational education, or depending on how you think you learn best, even a good collection of books, online resources and communities like this one. Or if you already have some skills, maybe try to get an internship or junior developer position in a company and work your way up? Or perhaps try yourself as a freelancer. There are many brilliant autodidact people as well, and some of those are better than some of the people with papers from some university. What you get out of the courses also depends on yourself. Do you do any optional reading and learn additional stuff on your own initiative, or do you limit your work to the absolute minimum required to pass the course? A university/college sets a framework for learning, but whether or not you will learn anything depends on yourself to a much greater extent that the kind of schools you've previously attended. What you will want to do with your life right now depends on what you're interested in doing, and what you want to end up doing. If you acquire web development specific skills, then you'll be a web developer (obviously). A CS degree (or any academic degree) is much less focused and you won't be anything specific. It opens up more pathways to choose from and you will gradually specialize yourself as you go. While I personally have a preference for academically oriented educations rather than vocational ones, I don't think there is anything wrong with the latter. I think it will be better to take a less higher education in something you really want rather than just being highly educated for the sake of being highly educated. It would be a shame wasting time (and money if you're in a country where tuition fees are the norm) on something that is not really what you want. What you might want to do is to check the course listing for the CS department you had in mind and evaluate whether or not you will need the skills acquired in those courses. Maybe there is even a day where they offer people to visit them so you can talk to the lecturers and students there so you can see if it's something you want. I hope what I wrote was somewhat helpful. It's some of the considerations I've made in regards to my own life and education anyway.
  10. All of them reduces maintainability.
  11. Ha... what the hell? Someone on the docs team having fun?
  12. For the most part, the ternary operator decreases readability, which is a really important part of programming. Code is much harder to read than write, so if you write code that is too unreadable it'll eventually come back to haunt you.
  13. Right, problem solved. I don't think we get further here.
  14. Dunno how long mine lasts. I never have it running on battery for long enough time that it's a concern.
  15. Yes, support is a brimming concern. The only resource for support are forums like these. Oh, I actually meant support in the sense that the software even runs on the given platform. I suppose support (=help) could be an issue for some people. I think Canonical offers paid support for Ubuntu though.
  16. Definitely. With broader vendor support I would move to Linux. It's kind of a chicken/egg problem though. They want platforms with many users, and users want broad support for the platform. Hopefully the vendor support will increase as Linux' market share does. I think Linux is better, but when you want apps that don't run on Linux you're out of luck.
  17. That's pretty accurate. 3 hours, 40 minutes, 48 seconds and your laptop is dead.
  18. Yeah, but running a VM with Windows kind of defeats the point as far as I'm concerned. Legally you would still need a license and then there is the performance and resource usage overhead with running two operating systems simultaneously. I've never liked Wine very much. I prefer to run my applications natively.
  19. Not if you want to occasionally play games and don't want to reboot all the time. Then there is Adobe CS if you care for such programs. GIMP/Inkscape doesn't even come near Photoshop/Illustrator. If/when I build myself a desktop to supplement my laptop, I'll run a Linux distro exclusively from this computer and put Windows on the desktop. Linux is superior as a development platform, but I use my laptop for other things as well. Besides, stupid people can fuck up a Linux install just as well as a Windows install. If they approve Vista's UAC prompts, do you really think they won't approve a sudo prompt?
  20. I've only got my laptop. Specs (on top of my head): CPU: Intel Core 2 Duo T7500 @ 2.2 GHz, 4 MB L2 cache RAM: 2*2 GB Kingston something HDD: 2*160 GB, 5400 RPM GPU: Nvidia GeForce 8600M something (256 MB dedicated, 1 GB shared) Monitor: 1440*900 px (glossy, which sucks because of the sun) OS: Vista x64/Ubuntu Fan: Dunno, but too often too loud. I bought it a couple of years ago. Still plays new games at varying graphics quality. I've been thinking about building a desktop computer as well.
  21. Linux. You should add that to the list... Or a brain and some common sense, though it only works if you're the only person using the computer. Occasionally I might install an AV/spyware program, but the search never finds anything. I don't like AV software because they always seem to significantly slow down the system, and full scans take half a day to complete.
  22. The forum has native support for polls. I've fixed it for you. Regarding the question, I don't use any.
  23. Doesn't Microsoft Word come with these capabilities?
  24. He already told you. He has only completed the front end.
  25. Yeah, see my first post.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.