KevinM1
Moderators-
Posts
5,222 -
Joined
-
Last visited
-
Days Won
26
Everything posted by KevinM1
-
Huh. So, do they not have function parameters?
-
Could be. I used Perl once, about 10 years ago, but didn't like it (it was a rush job by a college instructor, so he glossed over a lot, leading to a lot of "Huh?" moments). Never used Bash.
-
I have mixed feelings about this. Global is one of very many things that you can use wrongly in PHP. Should the language enforce good practices for everything? If not, why is Global so special? To me, 'global' is special because it isn't necessary at all, and is a direct cause of brittle code. To me, it falls close to other such language 'features' as register globals and magic quotes.
-
While i don't disagree with you at all, i fear half of the web would explode! Look at the fallout from GoDaddy's hosting services' recent changes. If there are websites out there relying on software source last updated 10 years ago, how can ye hath faith phasing global out would accomplish much at all. Sometimes a bit of pain is necessary to make positive change. Besides, like I said, in most cases (procedural code) it would merely produce a "Are you SURE you want to do it like that?" warning, which could be turned off via php.ini. It would only result in an error within class code because if you're merrily blowing apart encapsulation with a global, you're doing it wrong anyway. I don't see why the language itself should be complicit in such foolishness.
-
Something they should seriously consider adding: a parse error if 'global' is used within class code, and a warning if it's used anywhere else. It's the latter half of 2012, yet I still see 'global' used frequently both here and on Stack Overflow. Ridiculous.
-
Have Ruby/C# style object properties gotten the go-ahead yet? There was a rather nice proposal months ago, but it wasn't voted on the last I checked.
-
If you're truly interested, get a lawyer, and hammer out a contract that won't leave you in the lurch. Before that, try to verify the buzz surrounding the idea, and have someone else (3rd party) look over the business plan. Basically, if you're going to go for it, cover your ass and verify it's a good idea.
-
Completely unfair for you to relate entrepreneurship to gambling. "Idiot tax" is borderline offensive. My 2 cents. Why? Most small businesses fail, especially in a fickle and ever transient industry like technology. Even the successes are fragile. Remember when MySpace was relevant? Or Facebook held promise? Have you seen all the various projects that Kevin Rose has created and run into the ground? Locally, I remember when Cabletron was a fairly big deal in my state, and when Ektron wasn't hemorrhaging employees. Creating a new business is always a gamble. For me and my business, hooking my wagon to someone else's idea just doesn't make any sense. I'd rather toil away doing sites for other small-to-mid business owners for a few years in order to build the capital needed for me to work on my own ideas.
-
Well, it's a matter of mindset. If you're a mercenary focused on immediate payout, then maybe the question isn't really directed at you? My interpretation is that the poster is an entrepreneurial individual interested in the possibility of equity in a venture, and is looking for advice to that end from like-minded developers. Your pessimistic outlook on joint ventures, while providing a good caveat, is a bit harsh, in my opinion. Not every partnership opportunity is worthless. No, not every partnership is worthless. However, equity is often used by people to shift risk onto someone else. Yeah, if a project succeeds, everyone makes money. If it fails? The developer bears the burden of a wasted effort. Equity in addition or subsequent to payment is fine. However, that's very rarely the case. It's usually given in lieu of real money, which is a sucker's game. And, yeah, as a freelancer, I'm a mercenary by definition. I don't see the wisdom in spending time (which directly equates to income) on something that will likely not succeed when I can, instead, spend that time on projects that are guaranteed to pay. It's just bad business, all the way around. The lottery is called an 'idiot tax' for a reason.
-
Nope. I subscribe to the "Fuck you, pay me" school of business. In my experience, people offering equity are those who are too cheap to pay for quality labor while desperately trying to get their ill-conceived and doomed to fail Facebook/Twitter/Kickstarter/Craigslist clone launched ASAP.
-
Why? Like always, you assert that OOP is inherently better than procedural, but never actually explain why. So why is procedural defective compared to OOP? What is its critical, innate weakness?
-
I find iOS to be pretty clunky. It definitely hasn't aged well. OSX is decent. I tend to stick with Windows as it's what I'm most comfortable with (25 years of DOS/Windows use). Windows 7 is also a solid OS. I really need to get more comfortable with Linux. I don't use it enough, so I'm pretty weak with the command line. Outside of PHP development, I don't have a reason to use it.
-
Apple's niche market is hipsters. College is filled with them. Real nerds would have some sort of *nix machine, the more esoteric the distro, the better.
-
Is it flood insurance? If not, you're likely screwed. Lesson learned: don't place electronics in an area that can flood.
-
Passionate argument, but not really about coding help. This topic has been moved to Miscellaneous. http://forums.phpfreaks.com/index.php?topic=364505.0
-
She got in with a 1-0 vote. The ballot was signed "Jesi."
-
only display if there are items in the table available
KevinM1 replied to FUNKAM35's topic in PHP Coding Help
In the future, please place all posted code in either or tags. I took the liberty of doing it for you above. -
Welcome back to the Green Lantern Corp!
-
What have you tried so far?
-
I would like to see a lab sub forum
KevinM1 replied to aliento's topic in PHPFreaks.com Website Feedback
Basically, PM any existing staff, or just make a topic in coding help that specifies you think it would be a good snippet to add. No guarantees it will be added. -
I would like to see a lab sub forum
KevinM1 replied to aliento's topic in PHPFreaks.com Website Feedback
Uh: http://forums.phpfreaks.com/index.php?board=41.0 -
Line 54 is filled with syntax errors. You have an extra '||' at the end, an unneeded '&' at the end, and no closing parentheses. Also, your $selected variable is not guaranteed to have SELECTED as its value with the way you structured your if-conditional. An if (or else) without braces ( {} ) tells PHP that only the statement immediately following it will be executed if the condition is met. In other words, there's a big difference between: if(/*stuff*/) $selected = " SELECTED"; echo "..."; and if(/*stuff*/) { $selected = " SELECTED"; echo "..."; } In the first example, $selected is set if the condition is met, but the echo will always execute. In the second example, both the $selected assignment and echo are dependent on the if condition being met. Finally, in the future, when posting code on these forums, place it between either or tags.
-
Judging by that error message, $selected has no value (hence, undefined), but you're trying to echo it anyway.
-
Ultraviolet. Oooh, the irony. But, to be serious, I think maybe an aqua/turquoise color. I associate PHP with blue, mostly because of this site, C# with Xbox green, Ruby with red, C++ with lime green-on-black, and Python with forest/snake green.
-
You cannot know that till her missed period. Wait for 3 weeks and then tell us when she starts to throw up Hehe. We should really start a pool. One date for pregnancy announcement, another for engagement.