Comment On Loose Cat Handling

"I had a pretty good idea of what I was getting into," Christian Riesen wrote, "the company I started at was very forthcoming about their codebase, and how it had grown organically over the past 12 years. I took the job because it would be a challenge to convert it from single files with tons of includes to a to a framework-based approach." [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Loose Cat Handling

2012-06-12 12:10 • by Nagesh
383058 in reply to 382954
Recursive Reclusive:
Scrummy:
The less strongly-typed the language, the more important good unit testing is. This is a cornerstone of Agile development.

Does that have any relevance to the story?


No but is called baiting on internet forums.

Re: Loose Cat Handling

2012-06-12 12:22 • by Mason Wheeler
383060 in reply to 382987
Jay:
The problem is that there are languages that give you the flexibility to make programs that are efficient and that do a wide variety of tasks, and there are languages that make it hard for you to shoot yourself in the foot. But the overlap between the two is very small.


You should look at Pascal. Just as powerful as C, light-years easier to read, and actually designed to make it difficult to shoot yourself in the foot.

Re: Loose Cat Handling

2012-06-12 12:23 • by Mason Wheeler
383061 in reply to 383039
Herr Otto Flick:
Scrummy:
The less strongly-typed the language, the more important good unit testing is. This is a cornerstone of Agile development.


Unit testing only tests whether the code produces the correct results. It doesn't test whether the code is batshit insane, written by a 14 yr old who has been up for 3 days, or only working by happenstance.

It is entirely plausible that code which passes unit tests is as bollocks as this code is.


Unit testing only tests whether the code produces the results expected by the unit test. Nothing more, nothing less. Remember, the unit tests are code too, and can contain bugs. (Carry that thought to its logical conclusion and you end up with turtles all the way down.)

Re: Loose Cat Handling

2012-06-12 12:49 • by anony-mouse (unregistered)
383062 in reply to 383040
mouse building pedant:
anony-mouse:
Jazz:
foo:
Jazz:
In before everyone insists, without any rational reason or documentation, that PHP is a horrible mutant shitpile that deserves to be ridiculed, belittled, and exterminated.
s/before/after/;s/without/with/
(see 382952 and read the essay it mentions)

Sure, plenty of crap developers make pentagonal houses which fall apart when you knock on them using PHP. Plenty of good developers make flexible, secure websites with PHP, too, but you don't hear about them, because you like having PHP as the designated scapegoat to rag on.

Either show me some documentation that isn't one person's closed-minded uneducated opinion rant, or shut the fuck up.

Yeah, a good carpenter can make a good mouse with a rock instead of a hammer, but why would you?

He doesn't complain about PHP not being able to do X or Y, he complains about the inconsistencies with the language and it's irrational, unpredictable naming convention for things.

I also find it funny you call him close minded when you're the one screaming how good PHP is without being able to even acknowledge its obvious flaws.

Stay pist, PHP guy.


this modern learning astounds me ... explain again how a carpenter (good or otherwise) can make a good mouse with either a rock or a hammer?

also ... can he make bad mice as well?

anyway, presumably the $cat will be happy either way

that god damn m key, always sneaking up on me...

Re: Loose Cat Handling

2012-06-12 13:38 • by Remy Martin (unregistered)
Hey guys, unfortunately I have some really bad news.

Last night, Alex OD'd on meth after spending 70 hours straight playing Call of Duty: Modern Warfare. He was discovered in his parents' basement at 4:00am this morning. Please keep his family in your prayers, as me and Mike try to determine the future of this site.

Re: Loose Cat Handling

2012-06-12 14:37 • by Ima Cougar (unregistered)
383067 in reply to 383064
Remy Martin:
Hey guys...
There are guys here??!!! (Drool!)

Re: Loose Cat Handling

2012-06-12 14:50 • by Paul (unregistered)
383068 in reply to 382973
BR:
Leo:
...but it is. Anyone who likes PHP is by definition a terrible developer.


So half of the front-end developers at Facebook then?


Given how often FB seems to have weird and inexplicable problems crop up, I'm inclined to say a big "hell yes" to that.

Re: Loose Cat Handling

2012-06-12 15:04 • by Jay (unregistered)
383069 in reply to 382995
thetiredsaint:
This same thing works in Python.

for cat in cat:



Does exactly the same as the above PHP code.


I see the error. It should be:


for cat in hat:

Re: Loose Cat Handling

2012-06-12 16:51 • by fggr (unregistered)
PHP rocks. It's job security through being high while designing a language!

Re: Loose Cat Handling

2012-06-13 03:56 • by Christian (unregistered)
383073 in reply to 383021
Kriis:
I suppose

svn blame <file>

would do nothing but removed plausible deniability as to why the previous programmer's body parts has been stapled to bulletin board in the coffee room.


I hope I'm not the first to question your assumption that they have SVN that goes back that far...

They don't. All of these little gems are hidden behind the first developer that made the commit number 1 with EVERYTHING in the code base. Who did that before this commit is a mystery. Chances are the person is long gone.

Re: Loose Cat Handling

2012-06-13 04:55 • by uns (unregistered)
383074 in reply to 383071
fggr:
PHP rocks. It's job security through being high while designing a language!


I heard of a certain PHP core language developer who did just that (well, the "being high" part, anyway). This may be lore, but they seem to have seen the need for a "no commit while high" policy.

Re: Loose Cat Handling

2012-06-13 09:23 • by mercenary (unregistered)
383085 in reply to 382987
"If it involves reading a file with fixed-length fields and printing a report, you may be able to do it with COBOL."

Like running payrolls? It isn't as sexy as enabling college students to post pictures of their cats, heaven knows, but landlords, banks, grocery stores, etc. seem to be in favor of one's getting paid.

CAPTCHA: dignissim, most worthy, if it included us.

Re: Loose Cat Handling

2012-06-13 10:12 • by frits
383094 in reply to 383064
Remy Martin:
Hey guys, unfortunately I have some really bad news.

Last night, Alex OD'd on meth after spending 70 hours straight playing Call of Duty: Modern Warfare. He was discovered in his parents' basement at 4:00am this morning. Please keep his family in your prayers, as me and Mike try to determine the future of this site.
Ha ha ha! What wit!

Re: Loose Cat Handling

2012-06-13 12:23 • by Jay (unregistered)
383106 in reply to 383008
George:
Jay:
If it involves reading a file with fixed-length fields and printing a report, you may be able to do it with COBOL. But it's very difficult to hurt yourself. It's a child's plastic hammer language.
When I wrote some COBOL code to do string manipulation (change LASTNAME, FIRSTNAME to Firstname Lastname) the old timers got the strangest looks on their faces. It was not merely that what I had done was impossible to do, it was even impossible to imagine.

Of course that was way back then. Back before simply knowing COBOL meant I too, am an oldtimer! :(


Yes, I have fond memories of the time at my first IT job, back in 1980. At a meeting someone was describing how he thought a new system should work and he made a casual reference to reading the customer's name and searching for spaces to break it into first name and last name. And immediately half the programmers in the room protested that this was crazy and way too complicated and at this company we have fixed length fields with separate fields for first and last name. I was amused not just at the objection, but at how upset everyone obviously was about it. From the reaction it was like he had suggested they sell their daughters into prostitution or something.

Re: Loose Cat Handling

2012-06-13 12:27 • by Jay (unregistered)
383107 in reply to 383085
mercenary:
"If it involves reading a file with fixed-length fields and printing a report, you may be able to do it with COBOL."

Like running payrolls? It isn't as sexy as enabling college students to post pictures of their cats, heaven knows, but landlords, banks, grocery stores, etc. seem to be in favor of one's getting paid.

CAPTCHA: dignissim, most worthy, if it included us.


I didn't say there's no use for such a language. I just pointed out the contrast. Indeed, a language that makes it hard for you to hurt yourself, even if it's capabilities are sharply limited, might well be the best choice for beginning students and less-skilled programmers.

Re: Loose Cat Handling

2012-06-13 13:10 • by sod (unregistered)
383113 in reply to 383064
Remy Martin:
Hey guys, unfortunately I have some really bad news.

Last night, Alex OD'd on meth after spending 70 hours straight playing Call of Duty: Modern Warfare. He was discovered in his parents' basement at 4:00am this morning. Please keep his family in your prayers, as me and Mike try to determine the future of this site.


This is the sort of post that makes me furious. You're ruining this site! For the love of everything holy, why can't ignoramuses such as yourself see that you should have written "Mike and I"?

Captcha: saluto. I saluto your stupidity.

Re: Loose Cat Handling

2012-06-13 13:34 • by AN AMAZING CODER (unregistered)
383116 in reply to 382981
dogmatic:
BR:
Leo:
...but it is. Anyone who likes PHP is by definition a terrible developer.


So half of the front-end developers at Facebook then?


Having worked quite a bit with the FB API and php I would say yes, most if not all the devs at Facebook are pretty terrible.


Not only is the Facebook API not driven by PHP, but using the Facebook API with PHP has nothing to do with Facebook's view layer.

Re: Loose Cat Handling

2012-06-13 13:59 • by joao (unregistered)
383118 in reply to 382976
sfs:
Gandor:
I prefer languages, which will let you shoot yourself in the foot if you want to.

The problem is, that PHP is too easy to use. Maintaining such a mess after someone, that have "somehow" written the app is mind blowing...

...right, because we all know that C++ programs have far fewer bugs than PHP programs...


After .a customer of mine had a serious application crash they commissioned an analysis from a 3rd party. The application was developed in house.
To make a long story short, the "3rd" party blamed we network guys. The program was (original from Italian ) "ovviamente bugless " since it was written in VB. net. This is because. net runs into a sandbox, so bugs cannot exist.
It was a stupid network fault not handling 50gb dataset transmitted by select * queries every less than 2 seconds.
so trust our 3rd party: there are inherently bugless languages.

Re: Loose Cat Handling

2012-06-13 14:51 • by qbolec (unregistered)

convert it from single files with tons of includes

wait, what?

Re: Loose Cat Handling

2012-06-13 18:44 • by nisl (unregistered)
383131 in reply to 382938
Gandor:
I prefer languages, which will let you shoot yourself in the foot if you want to.

The problem is, that PHP is too easy to use. Maintaining such a mess after someone, that have "somehow" written the app is mind blowing...


This is why people should switch to languages that are compiled (over being interpreted). PHP is the same WTF to me as classic ASP. I understand that, in the past, PHP was the best (or good) thing available, but starting a project nowadays at anything that isn't in the "compilable" category (.NET being pretty much the only good one) is just insane, and stupid (no offense).

BTW, if somebody mentions that it's cheaper to host PHP - it's not (consider that, aside from the cost of OS, there's nothing that linux box can do that windows cannot, both quantity and quality wise). If somebody says, linux just performs better - wake the fuck up: that may have been the case in the past, but windows performs as good, if not better. Finally, for both of these cases, maintaining (including finding and paying developers) is harder and more expensive for the PHP/apache/unix choice.

:)

Re: Loose Cat Handling

2012-06-14 10:58 • by wbrianwhite
383143 in reply to 382981
dogmatic:
BR:
Leo:
...but it is. Anyone who likes PHP is by definition a terrible developer.


So half of the front-end developers at Facebook then?


Having worked quite a bit with the FB API and php I would say yes, most if not all the devs at Facebook are pretty terrible.

The one thing I can say for php, at least it isn't javascript. Now with html5 web devs are expected to make full scale web apps using js, a language that doesn't support file includes and object orientation only through a whole lot of syntactic sugar. And it has to run on many platforms with different implementations of js. Now QA and debugging time has multiplied by an order of 10. Makes me long for the days of Flash and Actionscript... say what you want about Flash, but at least AS3 is a real language and runs relatively the same across platforms. And furthermore, say what you want about the tenets of national socialism, dude, at least it's an ethos!


You can use javascript to load other javascripts, which is effectively includes. And javascript is fully object-oriented. You can use frameworks like jquery or prototype to smooth over all the browser differences. You should know all this if you're working with html5 apps.

Re: Loose Cat Handling

2012-06-14 11:09 • by wbrianwhite
383144 in reply to 383039
Herr Otto Flick:
Scrummy:
The less strongly-typed the language, the more important good unit testing is. This is a cornerstone of Agile development.


Unit testing only tests whether the code produces the correct results. It doesn't test whether the code is batshit insane, written by a 14 yr old who has been up for 3 days, or only working by happenstance.

It is entirely plausible that code which passes unit tests is as bollocks as this code is.


Test driven development has no inherent problem with batshit insane code. Which is why it's fine as a development methodology, but isn't sufficient for a maintenance methodology.

Re: Loose Cat Handling

2012-06-14 11:20 • by wbrianwhite
383145 in reply to 383131
nisl:
Gandor:
I prefer languages, which will let you shoot yourself in the foot if you want to.

The problem is, that PHP is too easy to use. Maintaining such a mess after someone, that have "somehow" written the app is mind blowing...


This is why people should switch to languages that are compiled (over being interpreted). PHP is the same WTF to me as classic ASP. I understand that, in the past, PHP was the best (or good) thing available, but starting a project nowadays at anything that isn't in the "compilable" category (.NET being pretty much the only good one) is just insane, and stupid (no offense).

BTW, if somebody mentions that it's cheaper to host PHP - it's not (consider that, aside from the cost of OS, there's nothing that linux box can do that windows cannot, both quantity and quality wise). If somebody says, linux just performs better - wake the fuck up: that may have been the case in the past, but windows performs as good, if not better. Finally, for both of these cases, maintaining (including finding and paying developers) is harder and more expensive for the PHP/apache/unix choice.

:)


We run all our .Net out of app_code so it's compiled on the fly. Development is just so much faster if you just need to hit F5 to refresh instead of going to studio and compiling.

Is classic ASP a crap design? Well MS just brought the design back with WebMatrix web pages -spaghetti code style mix of html tags and server side code.

Re: Loose Cat Handling

2012-06-14 14:45 • by Scrummy
383158 in reply to 383144
wbrianwhite:
Herr Otto Flick:
Scrummy:
The less strongly-typed the language, the more important good unit testing is. This is a cornerstone of Agile development.


Unit testing only tests whether the code produces the correct results. It doesn't test whether the code is batshit insane, written by a 14 yr old who has been up for 3 days, or only working by happenstance.

It is entirely plausible that code which passes unit tests is as bollocks as this code is.


Test driven development has no inherent problem with batshit insane code. Which is why it's fine as a development methodology, but isn't sufficient for a maintenance methodology.


But TDD does guard against outcomes that do not match business requirements. The $cat iterator was causing bad data to be returned, which would fail a test.

Re: Loose Cat Handling

2012-06-16 00:16 • by feugiat (unregistered)
383287 in reply to 383145
wbrianwhite:
nisl:
Gandor:
I prefer languages, which will let you shoot yourself in the foot if you want to.

The problem is, that PHP is too easy to use. Maintaining such a mess after someone, that have "somehow" written the app is mind blowing...


This is why people should switch to languages that are compiled (over being interpreted). PHP is the same WTF to me as classic ASP. I understand that, in the past, PHP was the best (or good) thing available, but starting a project nowadays at anything that isn't in the "compilable" category (.NET being pretty much the only good one) is just insane, and stupid (no offense).

BTW, if somebody mentions that it's cheaper to host PHP - it's not (consider that, aside from the cost of OS, there's nothing that linux box can do that windows cannot, both quantity and quality wise). If somebody says, linux just performs better - wake the fuck up: that may have been the case in the past, but windows performs as good, if not better. Finally, for both of these cases, maintaining (including finding and paying developers) is harder and more expensive for the PHP/apache/unix choice.

:)


We run all our .Net out of app_code so it's compiled on the fly. Development is just so much faster if you just need to hit F5 to refresh instead of going to studio and compiling.

Is classic ASP a crap design? Well MS just brought the design back with WebMatrix web pages -spaghetti code style mix of html tags and server side code.


No sane .NET developer will even install anything but Visual Studio (and waste time for amateur tools such as Webmatrix) or compile code on the fly (MS realized that VS website-project was a mistake and it fixed it by creating web-project template).

Re: Loose Cat Handling

2012-06-16 12:38 • by dogmatic (unregistered)
383298 in reply to 383143
wbrianwhite:

You can use javascript to load other javascripts, which is effectively includes. And javascript is fully object-oriented. You can use frameworks like jquery or prototype to smooth over all the browser differences. You should know all this if you're working with html5 apps.


I've been working with jquery and prototype for years. And I've used libraries like js require for includes. Jquery is great, but there are still plenty of cross browser compatibility issues that come up with it. Plus the fact that js runs at very different speeds depending on browser. I've made games with js and it is a debugging nightmare compared to something similar in flash. I even dabbled with Web os for a bit, which is really the only place you can be doing true html5 apps right now. Yes you can do html5 if you only plan to support a couple browsers, but for client work it still has to run on ie8, so no true html5. Web os was alright but compared to coding in Java for Android, still very much inferior. I guess I like my languages like my women... Strongly typed.

Re: Loose Cat Handling

2012-06-16 14:49 • by wbrianwhite
383301 in reply to 383158
Scrummy:
wbrianwhite:
Herr Otto Flick:
Scrummy:
The less strongly-typed the language, the more important good unit testing is. This is a cornerstone of Agile development.


Unit testing only tests whether the code produces the correct results. It doesn't test whether the code is batshit insane, written by a 14 yr old who has been up for 3 days, or only working by happenstance.

It is entirely plausible that code which passes unit tests is as bollocks as this code is.


Test driven development has no inherent problem with batshit insane code. Which is why it's fine as a development methodology, but isn't sufficient for a maintenance methodology.


But TDD does guard against outcomes that do not match business requirements. The $cat iterator was causing bad data to be returned, which would fail a test.


Where did it say that?

Also, it's entirely possible you had a series of isolated unit tests which all passed, and only the integration failed

Re: Loose Cat Handling

2012-06-16 14:52 • by wbrianwhite
383302 in reply to 383298
dogmatic:
wbrianwhite:

You can use javascript to load other javascripts, which is effectively includes. And javascript is fully object-oriented. You can use frameworks like jquery or prototype to smooth over all the browser differences. You should know all this if you're working with html5 apps.


I've been working with jquery and prototype for years. And I've used libraries like js require for includes. Jquery is great, but there are still plenty of cross browser compatibility issues that come up with it. Plus the fact that js runs at very different speeds depending on browser. I've made games with js and it is a debugging nightmare compared to something similar in flash. I even dabbled with Web os for a bit, which is really the only place you can be doing true html5 apps right now. Yes you can do html5 if you only plan to support a couple browsers, but for client work it still has to run on ie8, so no true html5. Web os was alright but compared to coding in Java for Android, still very much inferior. I guess I like my languages like my women... Strongly typed.


If you want to support every browser equally, I think your only safe bet is html 3.2.

Re: Loose Cat Handling

2012-06-16 14:55 • by wbrianwhite
383303 in reply to 383287
feugiat:
wbrianwhite:
nisl:
Gandor:
I prefer languages, which will let you shoot yourself in the foot if you want to.

The problem is, that PHP is too easy to use. Maintaining such a mess after someone, that have "somehow" written the app is mind blowing...


This is why people should switch to languages that are compiled (over being interpreted). PHP is the same WTF to me as classic ASP. I understand that, in the past, PHP was the best (or good) thing available, but starting a project nowadays at anything that isn't in the "compilable" category (.NET being pretty much the only good one) is just insane, and stupid (no offense).

BTW, if somebody mentions that it's cheaper to host PHP - it's not (consider that, aside from the cost of OS, there's nothing that linux box can do that windows cannot, both quantity and quality wise). If somebody says, linux just performs better - wake the fuck up: that may have been the case in the past, but windows performs as good, if not better. Finally, for both of these cases, maintaining (including finding and paying developers) is harder and more expensive for the PHP/apache/unix choice.

:)


We run all our .Net out of app_code so it's compiled on the fly. Development is just so much faster if you just need to hit F5 to refresh instead of going to studio and compiling.

Is classic ASP a crap design? Well MS just brought the design back with WebMatrix web pages -spaghetti code style mix of html tags and server side code.


No sane .NET developer will even install anything but Visual Studio (and waste time for amateur tools such as Webmatrix) or compile code on the fly (MS realized that VS website-project was a mistake and it fixed it by creating web-project template).


I'm pretty sure that Microsoft developed Webmatrix, right? Probably created by a sane group of .Net developers. Personally WebMatrix and Razor is what I think the first version of ASP.Net should have been. WebForms was a long wander through the dark finally relieved by MVC, which is acceptable but complicated, or WebMatrix, which is also acceptable. What's wrong with compile on the fly? Views in MVC are all compile on the fly. Why not make the view models and controllers the same?

Re: Loose Cat Handling

2012-06-18 12:19 • by Nagesh
383358 in reply to 383131
nisl:
Gandor:
I prefer languages, which will let you shoot yourself in the foot if you want to.

The problem is, that PHP is too easy to use. Maintaining such a mess after someone, that have "somehow" written the app is mind blowing...


This is why people should switch to languages that are compiled (over being interpreted). PHP is the same WTF to me as classic ASP. I understand that, in the past, PHP was the best (or good) thing available, but starting a project nowadays at anything that isn't in the "compilable" category (.NET being pretty much the only good one) is just insane, and stupid (no offense).

BTW, if somebody mentions that it's cheaper to host PHP - it's not (consider that, aside from the cost of OS, there's nothing that linux box can do that windows cannot, both quantity and quality wise). If somebody says, linux just performs better - wake the fuck up: that may have been the case in the past, but windows performs as good, if not better. Finally, for both of these cases, maintaining (including finding and paying developers) is harder and more expensive for the PHP/apache/unix choice.

:)


You are surely making joke. Widows box doesn't perform as well as linux box. Sorry, you are total in wrong.

Re: Loose Cat Handling

2012-06-18 23:06 • by Shark8 (unregistered)
383421 in reply to 382973
Yes, yes they are.

"Popularity" /= "competence"
« PrevPage 1 | Page 2 | Page 3Next »

Add Comment