KevinM1
Moderators-
Posts
5,222 -
Joined
-
Last visited
-
Days Won
26
Everything posted by KevinM1
-
Crap! I've been asked to change my PHP ! Its been working for years!
KevinM1 replied to JTapp's topic in PHP Coding Help
The fact remains that we can't adequately help you process an API if we don't know the API. If you can't divulge that information because of a NDA (whether explicit or not), so be it. But, really, the API should have documentation that you can follow, or, barring that, a real life person you can ask. Until you're able to provide relevant information, we cannot help you. It's not a matter of intent, but rather a lack of sufficient information. -
Caeser cipher help - excluding non-alphabetic characters
KevinM1 replied to winthropite's topic in PHP Coding Help
Yes, it would be bad if you asked to be spoon fed the solution. Especially since this seems to be a homework problem. -
Crap! I've been asked to change my PHP ! Its been working for years!
KevinM1 replied to JTapp's topic in PHP Coding Help
Maybe you should give us more detail, since we're not sitting in the room with you, like: Are you trying to build your own API? Access an existing API? Have you looked into cURL? -
How to determine 5 seconds instead of 24 hours using timestamp
KevinM1 replied to therocker's topic in PHP Coding Help
Calm down. No one is 'commanding' you to do anything. All we're doing is suggesting a different way of doing things based on our collective experience using the various time formats and functions available. Feel free to ignore that advice if you want. There's no MySQL or PHP police that's going to be sent after you, so there's no need to get defensive about it. -
I dislike GoDaddy, both because of what they stand for (they originally supported both SOPA and PIPA), and because the few times I was forced to use them it was a painful experience (horrible control panel, customer service that knew nothing, but always tried to upsell what they could, etc.). I have a reseller account at ICDsoft that suits my needs. Not sure of how they compare with GoDaddy with their prices, but I've had no complaints. And they can give you shell access if you require it, which is nice (I do since I use Symfony for most of my PHP projects). EDIT: Each site I have with them has their own shared hosting account. Their base level accounts have more than enough features to handle small-to-medium sites.
-
Classes are the definition/blueprint of a type. A type is something that both represents something and the actions that can be performed on that thing. Example: an integer is a type that represents whole numbers that can be manipulated via mathematics. Objects are individual, discrete instances of that class (type). Using the integer example, 5 would be an instance of an integer. With OOP, you're defining complex types and using individual instances of them to do things. They're complex because they're created using the base types (like string, int, etc.) that the underlying language comes with. The power of OOP comes from the fact that objects can contain other objects, and pass them around from object to object. That said, we're not just going to tell you how to complete your task. Show us what you've tried so far, and we'll help, but we don't just give out answers on request as a matter of policy.
-
I'm so, so sorry that the free professional (yes, professional... those of us with badges write PHP for a living) advice we have given you has somehow offended your delicate sensibilities. An edible bouquet will be shipped to you, with its fruit grown and sustained, in part, by our shameful tears. I think we can convince trq to end his own life, if you feel that your unique and entitled snowflake-ness needs something more than our communal genuflection.
-
Beautiful would probably be something like ruby or python. I'm a big fan of C#, as aside from Microsoft's penchant for long ass names, it's an incredibly readable C dialect (it's also a nicer language than Java on the whole, but that's another issue). C# only gets funky when you start dealing with parameterized types, and it's not really any more difficult than figuring out pointers in C/C++.
-
I think it's also important to note that: 1. 3-5 years experience really isn't anything special. I'm not trying to sound harsh, but if you look at non-web software development gigs, you'll see that they require a BS in Computer Science plus at least two years practical experience. And that's just to have them not ignore your resume outright. So, no, 3-5 years isn't really adequate to even think about a senior position. 2. You do realize that a Senior Developer is usually a management position, right? What's your experience in leading other developers? In being able to successfully allocate time and resources for everyone under you? To regularly meet with the business and/or PR arm of companies to keep everything on track? To have (one of) the final says in app design? Josh and trq have been pretty gentle with this whole thing, but here's the truth: if you go into an interview and say "Hi, I'm 21 years old with 3-5 years experience, and I'm applying for the Senior Developer position," you will be laughed out of the building unless you have an impeccable portfolio with references (to corroborate the management portion of the job) to match. It's just wholly unrealistic.
-
If you don't need to use what you're echoing later, just echo it directly. If you do, assign it to a variable, then echo. And doing both on one line is, like others have said, bad for readability and debugging. Just because you can do something doesn't mean you should.
-
Well, HTML isn't a programming language. It doesn't have any brains, as it were. It's just text markup (indeed, that's why it's called Hypertext Markup Language). HTML is incredibly simple, with the hardest thing figuring out the difference between inline and block elements. CSS is a bit more complicated (mostly with the way it handles element positioning), but the basics are simple enough. PHP isn't reliant on JavaScript (or vice versa). In fact, PHP and JavaScript live in two different environments. PHP is executed on the server, whereas JS is executed in the browser. Because of this crucial difference, you'll need to be familiar with the HTTP request cycle, which is basically: Request to server --> Server side processing (PHP, or some other language) --> Response to user (output, which would include HTML, JavaScript, images, etc.) That said, JavaScript has become increasingly important to learn because it's what makes pages interactive. Think about what Google does. All of the data is on their servers, but they use JavaScript to request that data and update the screen seamlessly. So, at the very least, you'll want to become familiar with the basics there as well if you actually want to become a developer. If you're just doing an assignment, think of JS as extra credit. It's not necessary in the process of creating dynamic sites, but it can add that extra layer of polish that shows that you're willing to put forth extra effort. Regarding resources, I'm not sure of any website that would meet my standards. Someone somewhere will no doubt mention w3schools, but that's a bad idea (see the w3fools link in my signature for the reason why). The vast majority of PHP tutorials available suck. They're either outdated, or they show exactly the wrong way to do things (like using 'global' everywhere). The best introductory resource I've found is Larry Ullman's Visual Quickstart Guide (http://www.amazon.com/PHP-MySQL-Dynamic-Web-Sites/dp/0321784073/ref=sr_1_1?s=books&ie=UTF8&qid=1388598161&sr=1-1&keywords=larry+ullman). Easy to read, lots of pictures showing the exact code in action, and no glaring errors. Yeah, it's a book, which costs money, but it's the best introductory resource available, IMO. Luckily, there is a good, free online resource for front end (HTML, CSS, JavaScript) stuff. The Mozilla Developer Network (https://developer.mozilla.org/en-US/docs/Web) will give you just about everything you need there. It's by far the best resource available for the basics, as it's written/maintained by the people who make the Firefox web browser, which is also the same group that created JavaScript to begin with. So, you'll be getting the info straight from the source.
-
Have you checked to see if they (Yahoo! Finance) have an API or some other feed you can hook into?
-
I didn't even notice they were trying to invoke it via on change. Yeah, that won't work. Basically, the answer is learn to code.
-
Defining a function is different than invoking/running a function. Something like: function someFunction($x) { // do something with $x } Is a function definition. But that's all it is. It doesn't run right then and there. Function invocation looks like: someFunction($x); Look at your code - you're blending them together (note where you have the semicolon, and how you have a code block following it... that's incorrect syntax). You need to define a function before you can run it.
-
Is getting a PHP/Programming Degree Important?
KevinM1 replied to mostafatalebi's topic in Miscellaneous
Pretty much. A degree tells employers you can handle deadlines, juggle multiple tasks, and that sort of thing. The very next thing they'll want to know are your skills. A portfolio is vital in conveying that. And, during the interview process, be prepared to write code then and there. It's not necessarily critical that you get their coding tests correct, but that you show you can understand the problem, come up with a way to tackle it, and if it doesn't work, understand why it doesn't work and how you'd tweak it so it would/could work. Employers want to see that you think like a programmer. Knowing language features/limitations is less important than problem solving and debugging skills and showing them you don't need your hand held for every little thing. If you can think like a programmer, then learning syntax isn't a big deal. Employers would also much rather you know what your weaknesses are and that you've taken concrete steps to address them (as that shows you're aware of yourself within the context of the skillset you need, and it shows you're a self-starter) than someone who gives a canned answer about being too much of a perfectionist, or something eyerollingly bad like that. -
Is getting a PHP/Programming Degree Important?
KevinM1 replied to mostafatalebi's topic in Miscellaneous
If Canada is anything like the States, then having a degree in something is usually necessary to even be considered for anything that's not freelancing. It doesn't have to be programming/computer science related, although that's definitely more desirable, but a college/university degree in something is usually a requirement in even getting your foot in the door. AFAIK, certificates aren't desirable. They show that you know certain language features and minutiae, but don't illustrate whether or not you can problem solve. A better route to go would be to build a portfolio of sites/projects that show you tackling specific problems. That shows practical, in-the-field knowledge that's far more valuable to an employer. -
...or, you could break it up into chunks. Read a certain number of lines, process, read more, etc.
-
What do you mean "there won't be any brands without a function?"
-
Of course it didn't work. ASP and PHP are completely different languages. You can't expect to slap '$' in front of everything and have it work. What are you trying to do? As in, what is the programming task you're trying to accomplish? Because it's likely there's no 1-to-1 translation.
-
FWIW, I use Hover.com for my domains. They start at $15/domain, which is a bit expensive, but they have a great, intuitive control panel, and never try to upsell me on anything. Between them and ICDSoft for shared hosting, I've never had any issues with performance, uptime, customer support, etc.
-
Where is $connection coming from? It needs to exist before you can use it.
-
Please don't suggest using globals. We strive to teach best practices here, and using 'global' is anything but.
-
...or, add the points, then redirect via headers?
-
@Obafainka, we have rules here. One of them is that we don't simply do other's work for them. We address people's problems with specific coding problems. Another rule is that if you need someone to do the bulk of the work for you, that you post in our freelance section. Since you violated two rules and exhibited cocky attitude towards a member of the forum staff, consider yourself on incredibly thin ice.