GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   All your PHP scripts will blow up one day! Seriously! (https://gfy.com/showthread.php?t=1142043)

edgeprod 06-04-2014 09:55 AM

I should clarify my last comment for a broader audience: what I mean is that I always focus on how easy it is for the next guy to maintain any code produced, and how easy it is for the next guy to add features to the existing code.

I'm sure a lot of people have heard "fuck, that is awful, we have to rebuild it." Sometimes that's true, and sometimes it's just a lazy or inexperienced developer. I write code to avoid that situation.

By using PHP for your project, you expand the availability of qualified and price-effective engineers available to support and extend your product.

dicknipples 06-04-2014 10:04 AM

Quote:

Originally Posted by edgeprod (Post 20111648)
I should clarify my last comment for a broader audience: what I mean is that I always focus on how easy it is for the next guy to maintain any code produced, and how easy it is for the next guy to add features to the existing code.

I'm sure a lot of people have heard "fuck, that is awful, we have to rebuild it." Sometimes that's true, and sometimes it's just a lazy or inexperienced developer. I write code to avoid that situation.

By using PHP for your project, you expand the availability of qualified and price-effective engineers available to support and extend your product.

:thumbsup

thumbuilderic 06-04-2014 11:48 AM

Quote:

Originally Posted by edgeprod (Post 20111648)
I should clarify my last comment for a broader audience: what I mean is that I always focus on how easy it is for the next guy to maintain any code produced, and how easy it is for the next guy to add features to the existing code.

I'm sure a lot of people have heard "fuck, that is awful, we have to rebuild it." Sometimes that's true, and sometimes it's just a lazy or inexperienced developer. I write code to avoid that situation.

By using PHP for your project, you expand the availability of qualified and price-effective engineers available to support and extend your product.

That's really what matters!

CPA-Rush 06-04-2014 02:29 PM

javascript scare me
java sun and python create good virus
i'm not java :1orglaugh

Zeiss 06-04-2014 04:26 PM

https://lh4.googleusercontent.com/-Z...0-h800/job.jpg
just saying.. :1orglaugh

sobecash 06-05-2014 12:49 AM

Quote:

Originally Posted by thumbuilderic (Post 20111857)
That's really what matters!

True, but seldom what happens. In most coding environments, validation and QA take up most of the time. In web programming a lot of the code is done by people who did not start out as programmers.

The website works, and every so often the page fails, and then we fix it. Such is life in internet time.

edgeprod 06-05-2014 01:45 PM

Quote:

Originally Posted by sobecash (Post 20112812)
True, but seldom what happens. In most coding environments, validation and QA take up most of the time. In web programming a lot of the code is done by people who did not start out as programmers.

The website works, and every so often the page fails, and then we fix it. Such is life in internet time.

Wow, sorry to hear you have to go through that. Hope things get better. Look into unit testing, if you want to cut out a lot of the BS taking up by validation, QA, etc.

The Hun 06-05-2014 02:15 PM

I am a programmer. Started way way back programming 8086's in machine language 'cause that's what was around... Even did some web stuff in assembly 'cause that was the fastest way to do it. These days programmers don't seem to feel the need to make stuff run efficiently. They use resources like they're nothing and when something is slow they use more machines... sure, that's a solution, but in my opinion not a very good one. It makes huge monsters of programs with unreadable code and patches upon patches upon patches...

A web programmer needs to know a server-side scripting and a client side one. Of course, you don't need the client side per se, but the power of thousands of computers ran by the visitors can make a site faster than doing all the math on the server. At the same time doing the same calculations over and over again for every single user when you don't have to doesn't make sense. So it's never easy to decide to do something server/client side. I use PHP for the server, and a combination of MySQL ('cause of it's HUGE flexibility and enormous possibilities in queries) and Redis ('cause of it's mere speed, thehun for instance is ran in PHP using Redis as the Database, life from the DB, no other caching. We also run our banner rotation in PHP/Redis, rotation, geo/device targeting, stats, all live, and all in PHP/Redis). On the client site I use a lot of jQuery, which is basically a layer over JavaScript. Very useful if you use it right.

I'd rather spend 2 days figuring out how to make a program run faster or how to get a query more effective than to spend any time on a new server.

A little example of what strikes me as a programmer these days: sites that server video at 76 times the speed (and higher) of the video... How can someone watch a video at 76 it's original speed? Stuff like that is just stupid to me... People burn resources like they're nothing, and up to a certain point they're right of course, but the real programmers, the codes from the old days that have speed in mind, they're rare these days... people rather play around with WorldPress or whatever, which is great for some things, but not for most...

A simple example from this post, can't remember the exact code, but it came down to this:

$v=7
$retval=($v==7)?true:false;

this is a waste of resources... the ($v==7) already results in a true or false... And this is just a small thing. I used to work on inner-loops of game engines, trying to get rid of for-loops 'cause the 'checking if the counter reached 0 yet' 'caused an extra cache-miss in the CPU... ok, agreed, that was really going very far, but that's probably why we never used more than one machine for thehun...

edgeprod 06-05-2014 02:23 PM

Very good post on server resources. Many projects here aren't autoloading, aren't optimizing queries, some don't even have column indexes in their databases! It's .. troubling, at best.

alf6300 06-05-2014 03:34 PM

lot of good points in this thread.

one point to consider: in my experience, a lot of startups fail precisely _because_ the code is too good - rather than because the code sucks.

when you are starting a business, perfectionism kills as much as sloppiness.
many techies will disagree, but truth is that business priorities are never aligned with technical priorities. and unless you are in academia or in a basement, when there is a tradeoff between the two, business takes precedence over better code.

in an online startup, a key to success is to understand where the ideal balance lies. this requires both business and (at least some) technical skills. if you don't have some of both, and you are the boss, you are usually in trouble.

The Hun 06-05-2014 03:46 PM

If you don't know programming you have to find someone that does. Biggest problem with programmers is that they usually lack any business sense, don't document, dictate what's going on with the software and pretty much make it impossible for anybody to understand what's going on just to make sure they are never kicked out of the loop. That's politics though, I thought this was about the programming side of things :)

edgeprod 06-05-2014 04:10 PM

Quote:

Originally Posted by alf6300 (Post 20113752)
lot of good points in this thread.

one point to consider: in my experience, a lot of startups fail precisely _because_ the code is too good - rather than because the code sucks.

Minimum Viable Product is all that matters.

blackmonsters 06-05-2014 05:00 PM

Quote:

Originally Posted by The Hun (Post 20113767)
If you don't know programming you have to find someone that does. Biggest problem with programmers is that they usually lack any business sense, don't document, dictate what's going on with the software and pretty much make it impossible for anybody to understand what's going on just to make sure they are never kicked out of the loop. That's politics though, I thought this was about the programming side of things :)


I object to the highlighted part because you make it sound like we do that on purpose.

:1orglaugh

edgeprod 06-05-2014 07:18 PM

Quote:

Originally Posted by blackmonsters (Post 20113830)
I object to the highlighted part because you make it sound like we do that on purpose.

A lot the do. :Oh crap

The Hun 06-05-2014 10:50 PM

Al lot do indeed. I see that with a lot of sites that are beyond startup. Sad really. Comes to proof: if you don't have the technical knowledge make a programmer part owner of the company so at least you're both on the same side. Do make sure you find a programmer that understands programming alone doesn't make anybody money. You need more than just good programming. Marketing, good ideas, stuff like that. 1+1=3 so to say...

sobecash 06-06-2014 02:30 AM

Quote:

Originally Posted by blackmonsters (Post 20113830)
I object to the highlighted part because you make it sound like we do that on purpose.

:1orglaugh

In my experience, those who are currently programmers who had no prior corporate training and experience, or who did not go through programming courses, have problems with documentation.

On the other hand, I remember the time when IBM was pushing their standards on every big project, where 80% of the time is spent on design and validation, prior to coding.

The fine line right now in webdev is that of getting the project running online, and fixing it as it goes. Kind of like the Yorktown getting fixed at sea while en route from the Battle of the Coral Sea right to the Battle of Midway.

The Hun 06-06-2014 02:53 AM

Quote:

Originally Posted by sobecash (Post 20114164)
In my experience, those who are currently programmers who had no prior corporate training and experience, or who did not go through programming courses, have problems with documentation.

On the other hand, I remember the time when IBM was pushing their standards on every big project, where 80% of the time is spent on design and validation, prior to coding.

The fine line right now in webdev is that of getting the project running online, and fixing it as it goes. Kind of like the Yorktown getting fixed at sea while en route from the Battle of the Coral Sea right to the Battle of Midway.

Prototyping is not the most efficient way to program, it is the fastest way to show results though, so 'cause of pressure from anybody that doesn't know programming it's often used as the way to go. Admitted: I also prototype a lot. I'd like to know at an early point whether something works or not, so I make a proof-of-concept to play around with before I build. Not really prototyping, but the next bad thing :)...

It works though. Although fixing one thing might mean you're breaking something else. That's why I'm all for documenting right, create API's to enable different programmers can work on the same thing and not mess with the lower layers when they don't have to. Data abstraction is a good thing! It might cause some overhead (and I hate wasting resources usually), but there is the law of diminishing returns which means that it's good to have some overhead if that overhead will be made back by maintainability. Well, actually the law describes the opposite where you shouldn't put more effort in something than it makes back, but it comes down to the same thing...

VladS 06-06-2014 03:01 AM

Usually, you also get what you pay for - i daily have a bunch of requests like "hey, i need this done, how cheap can you do it?", well sometimes it can be done cheap, sometimes it cannot, if you're not prepared to invest in your business and want half way solutions, you will usually do get half way solutions.

Coding takes time and if properly done, takes even more time. For most of coders, they cut on quality or documentation or somewhere in between and hurry up projects just to grab a cheque.

Eventually, it's a mix between finding the right coder and the right client. In adult this doesn't happen too often i think.

thumbuilderic 06-06-2014 09:38 AM

Quote:

Originally Posted by sobecash (Post 20112812)
True, but seldom what happens. In most coding environments, validation and QA take up most of the time. In web programming a lot of the code is done by people who did not start out as programmers.

The website works, and every so often the page fails, and then we fix it. Such is life in internet time.

I hate to bash on new programmers/scripters. Sometimes people just don't have the occasion to learn PSR standards, etc.

We should try to keep this thread positive and informative for new people learning. I know that there are probably some new people who just haven't learned everything yet (but still want to make things, and that's good!). But these people probably don't know how to use git, write unit tests, manage dependencies, or write even good OO code.

I will agree with Dom, unit testing is amazing and can save a lot of time. You should look into PHPUnit. You can add it as a dependency via Composer. getcomposer.org if you don't have it.

Hopefully that helps you to spend more time writing good quality programs and not debugging and trying to find errors!

thumbuilderic 06-06-2014 09:43 AM

Quote:

Originally Posted by edgeprod (Post 20113948)
A lot the do. :Oh crap

Yeah, a lot do... I have some friends who intentionally do that for job security. Stupid. I'd fire someone if I knew they were intentionally making code difficult or not documenting their work. What good is it to have some cryptic system where nobody can read the source!?

thumbuilderic 06-06-2014 09:45 AM

Quote:

Originally Posted by The Hun (Post 20114170)
Prototyping is not the most efficient way to program, it is the fastest way to show results though, so 'cause of pressure from anybody that doesn't know programming it's often used as the way to go. Admitted: I also prototype a lot. I'd like to know at an early point whether something works or not, so I make a proof-of-concept to play around with before I build. Not really prototyping, but the next bad thing :)...

It works though. Although fixing one thing might mean you're breaking something else. That's why I'm all for documenting right, create API's to enable different programmers can work on the same thing and not mess with the lower layers when they don't have to. Data abstraction is a good thing! It might cause some overhead (and I hate wasting resources usually), but there is the law of diminishing returns which means that it's good to have some overhead if that overhead will be made back by maintainability. Well, actually the law describes the opposite where you shouldn't put more effort in something than it makes back, but it comes down to the same thing...

You're a smart fucking person. I love reading your comments!

PornDiscounts-V 06-06-2014 10:47 AM

Quote:

Our architecture is heavily sharded, fast, and scalable to handle the absurd amount of growth we?ve had in the last few years.
Lost me at heavily sharded.

dicknipples 06-06-2014 11:17 AM

Quote:

Originally Posted by thumbuilderic (Post 20114547)
I hate to bash on new programmers/scripters. Sometimes people just don't have the occasion to learn PSR standards, etc.

Then stick to being a hobbiest programmer and don't make it your career.

milambur 06-07-2014 02:16 AM

Quote:

Originally Posted by alf6300 (Post 20113752)
lot of good points in this thread.

one point to consider: in my experience, a lot of startups fail precisely _because_ the code is too good - rather than because the code sucks.

when you are starting a business, perfectionism kills as much as sloppiness.
many techies will disagree, but truth is that business priorities are never aligned with technical priorities. and unless you are in academia or in a basement, when there is a tradeoff between the two, business takes precedence over better code.

in an online startup, a key to success is to understand where the ideal balance lies. this requires both business and (at least some) technical skills. if you don't have some of both, and you are the boss, you are usually in trouble.

My main problem has always been that I strive for perfectionism in my work. It makes it difficult to hire and lead people because you always focus on the flaws. It also makes it very hard to accept that good enough is when things should hit the market, not when they are perfect. Getting over these issues is what is holding many people back and often is what they should be focusing on solving to be successful entrepreneurs.

A high achiever can probably do things better than most people, but even if you can do something twice as good as somebody else, you have limited time available. Hiring people and proper work division is essential to succeeding. If you want to be a developer, hire someone with a business sense to lead you. If you want to be a leader, don't tell your employees how to code, give them reasonable guidelines and if they are unable to live up to the guidelines then fire them. If you want to be both, which really isn't the best of ideas, don't bury yourself in detail and make sure not to look over your employees shoulders all the time.

adultchatpay 06-07-2014 04:59 AM

Cool info!

The Hun 06-07-2014 12:08 PM

Quote:

Originally Posted by milambur (Post 20115420)
My main problem has always been that I strive for perfectionism in my work. It makes it difficult to hire and lead people because you always focus on the flaws. It also makes it very hard to accept that good enough is when things should hit the market, not when they are perfect. Getting over these issues is what is holding many people back and often is what they should be focusing on solving to be successful entrepreneurs.

A high achiever can probably do things better than most people, but even if you can do something twice as good as somebody else, you have limited time available. Hiring people and proper work division is essential to succeeding. If you want to be a developer, hire someone with a business sense to lead you. If you want to be a leader, don't tell your employees how to code, give them reasonable guidelines and if they are unable to live up to the guidelines then fire them. If you want to be both, which really isn't the best of ideas, don't bury yourself in detail and make sure not to look over your employees shoulders all the time.

Partially agree... although it's not healthy not to be able to delegate tasks and trust people take good care of you it's also not smart not to keep track of what's going on... problem is that programmers smart enough to manage a whole project usually don't work for a boss... I think the healthiest way is to either know how to manage programmers yourself (or be one) or get someone on board (on board being not 'just' on the payroll) that can take care of the technical side of your business. Don't underestimate the programming. Bad programming fixed by bad programmers leads to even worse programming usually and will always hurt maintainability of your site. Also, never put yourself in the position where the programmer can tell you what to do. If he's 'just' on the payroll and you get into an argument remember that most power is with the programmer. He has the power to take down a site at the flick of a switch... Not that you should be scared of hiring a programmer, but it's always smart to think about these things before you run into any problems...

I've been in this industry for a while now and I've seen programmers and tech people hijack a whole company. And not only in this industry. As many of you know I run a recording studio in the Netherlands. For an English movie I was hired to do the surround post processing, but the guy that did the audio kept some of the dialogs on his laptop so they couldn't go around him... of course he refused to give me the dialog of one actor and I couldn't do the surround mix... Better safe then sorry...

adultmobile 06-07-2014 12:42 PM

Some perfectionism in code, which leads to loss of focus on the scope of your business (i.e: to make the most money in shortest time as possible), often is caused by asperger syndrome. People in doubt can take a test here: http://www.rdos.net/eng/Aspie-quiz.php

milambur 06-07-2014 04:43 PM

Quote:

Originally Posted by The Hun (Post 20115806)
Partially agree... although it's not healthy not to be able to delegate tasks and trust people take good care of you it's also not smart not to keep track of what's going on...

When you own a company obviously you need to keep track of what is going on in it. But there is a big difference between keeping an eye on things and telling everybody what to do. Good leadership is far harder than programming, and like everything else it is a skill that needs to be constantly maintained. Keeping up with both programming (or really being any type of specialist) and being a good leader will not work for any but a lucky few.
Quote:

Originally Posted by The Hun (Post 20115806)
problem is that programmers smart enough to manage a whole project usually don't work for a boss...

In Sweden there aren't that many freelance programmers that are good, not that I have found anyway and trust me I have looked. Running a successful business here isn't that easy and good programmers are very sought after. Why work your ass off in your own business when there are hundreds of IT companies that offer you jobs with 35 hour work weeks (and you can usually work from home several days a week), 6 weeks vacation, pension, paid sick leave, private healthcare and $60K-$100K+ each year.

Quote:

Originally Posted by The Hun (Post 20115806)
I think the healthiest way is to either know how to manage programmers yourself (or be one) or get someone on board (on board being not 'just' on the payroll) that can take care of the technical side of your business.

I've had several bad experiences taking on partners, I only take on external minority investors now. Bonuses works as great incentives if used right.
Quote:

Originally Posted by The Hun (Post 20115806)
Don't underestimate the programming. Bad programming fixed by bad programmers leads to even worse programming usually and will always hurt maintainability of your site.

Bad code is a leadership problem, if the programmers don't get proper management and/or requirements then the code will be bad.
Quote:

Originally Posted by The Hun (Post 20115806)
Also, never put yourself in the position where the programmer can tell you what to do. If he's 'just' on the payroll and you get into an argument remember that most power is with the programmer. He has the power to take down a site at the flick of a switch... Not that you should be scared of hiring a programmer, but it's always smart to think about these things before you run into any problems...

I never let programmers control the actual sites, they work with test sites until the code is ready to be deployed. Code security is very important, everything should be double-checked for malicious code and backdoors before being deployed.

Quote:

Originally Posted by The Hun (Post 20115806)
I've been in this industry for a while now and I've seen programmers and tech people hijack a whole company. And not only in this industry. As many of you know I run a recording studio in the Netherlands. For an English movie I was hired to do the surround post processing, but the guy that did the audio kept some of the dialogs on his laptop so they couldn't go around him... of course he refused to give me the dialog of one actor and I couldn't do the surround mix... Better safe then sorry...

There are untrustworthy people everywhere, I only trust people to the extent I can afford.


All times are GMT -7. The time now is 05:15 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123