Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69889 > unrolled thread
| Started by | alister <alister.nospam.ware@ntlworld.com> |
|---|---|
| First post | 2014-04-08 17:19 +0000 |
| Last post | 2014-04-10 10:41 +1000 |
| Articles | 7 — 5 participants |
Back to article view | Back to comp.lang.python
Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing? alister <alister.nospam.ware@ntlworld.com> - 2014-04-08 17:19 +0000
Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-08 17:25 +0000
Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing? Chris Angelico <rosuav@gmail.com> - 2014-04-09 03:36 +1000
Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing? Chris Angelico <rosuav@gmail.com> - 2014-04-09 03:29 +1000
Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing? alex23 <wuwei23@gmail.com> - 2014-04-09 10:02 +1000
Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-09 09:55 +0100
Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing? alex23 <wuwei23@gmail.com> - 2014-04-10 10:41 +1000
| From | alister <alister.nospam.ware@ntlworld.com> |
|---|---|
| Date | 2014-04-08 17:19 +0000 |
| Subject | Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing? |
| Message-ID | <ScW0v.98805$Pb.4577@fx31.am4> |
On Wed, 09 Apr 2014 01:48:52 +1000, Chris Angelico wrote: > I managed to convince him to let me use Pike for a lot of the work, > though I suspect that - now that we're no longer working together - > he's ripping a lot of it out in favour of either PHP or JavaScript. > And that's a job I wouldn't wish on my worst enemy. > > ChrisA Why was your code that bad? ;-) -- Kin, n.: An affliction of the blood.
[toc] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2014-04-08 17:25 +0000 |
| Message-ID | <534430ed$0$29993$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #69889 |
On Tue, 08 Apr 2014 17:19:46 +0000, alister wrote: > On Wed, 09 Apr 2014 01:48:52 +1000, Chris Angelico wrote: > >> I managed to convince him to let me use Pike for a lot of the work, >> though I suspect that - now that we're no longer working together - >> he's ripping a lot of it out in favour of either PHP or JavaScript. And >> that's a job I wouldn't wish on my worst enemy. >> >> ChrisA > > Why was your code that bad? ;-) Now be kind! It's not that Chris' code was bad, but obviously Pike is such a rubbish language that it's all but untranslatable... :-P -- Steven D'Aprano http://import-that.dreamwidth.org/
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-04-09 03:36 +1000 |
| Message-ID | <mailman.9033.1396978581.18130.python-list@python.org> |
| In reply to | #69890 |
On Wed, Apr 9, 2014 at 3:25 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > Now be kind! It's not that Chris' code was bad, but obviously Pike is > such a rubbish language that it's all but untranslatable... > > :-P Now that's completely not true! Translating Pike into PHP is by definition easy. Look: // Pike code: int x = (1==2) ? 3 : 4; # PHP code: $x = (1==2) ? 3 : 4; # Python code: x = 3 if 1==2 else 4 See? Python is just arbitrarily different! The ?: operator is fundamental to so much of programming, and Python has to go and break it! (*Stop* trolling you?!? But this is getting-trolled-on-the-head lessons... anyway, you started it...) ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-04-09 03:29 +1000 |
| Message-ID | <mailman.9032.1396978173.18130.python-list@python.org> |
| In reply to | #69889 |
On Wed, Apr 9, 2014 at 3:19 AM, alister <alister.nospam.ware@ntlworld.com> wrote: > On Wed, 09 Apr 2014 01:48:52 +1000, Chris Angelico wrote: > >> I managed to convince him to let me use Pike for a lot of the work, >> though I suspect that - now that we're no longer working together - >> he's ripping a lot of it out in favour of either PHP or JavaScript. >> And that's a job I wouldn't wish on my worst enemy. >> >> ChrisA > > Why was your code that bad? ;-) It was idiomatic Pike code, which is in many ways similar to idiomatic Python (definitely not exactly, but I'm guessing you're not familiar with Pike, so just pretend I'd written a good few KLOC of idiomatic Python). The code is expressive; in just a handful of lines, I can do bulk operations on entire arrays of values, and I can comfortably run callbacks efficiently, and (this part wouldn't work so easily in Python) on a SIGHUP, the code would smoothly switch over to the latest version on the disk, without breaking any currently-processing work. Now try rewriting that in PHP (or serverside JavaScript - probably node.js or something - but he hadn't gone anywhere beyond the "vague theory" stage with server JS, so PHP is more likely). Bear in mind that you have to handle multiple concurrent network connections, so you need to do either piles of threads/processes or asynchronous I/O (the Pike code used the latter). So, yeah. My code would make for terrible PHP. :) One day, out of morbid curiosity, I might try SSHing into one of the boxes to see whether any of the accounts are still there for which I know the passwords. (I was the primary network admin, so I knew the passwords for a lot of obscure accounts on obscure servers.) Would be interesting to see what's going on there. But more than likely the project's dead in the water. It's highly unlikely he'll find a decent programmer willing to work for the low wages I was getting there, and even less likely that he'll have the time to do it all on his own. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | alex23 <wuwei23@gmail.com> |
|---|---|
| Date | 2014-04-09 10:02 +1000 |
| Message-ID | <li22lr$i9f$1@dont-email.me> |
| In reply to | #69891 |
On 9/04/2014 3:29 AM, Chris Angelico wrote: > My code would make for terrible PHP. :) Don't feel bad about that. It's a truism for every language, including PHP.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-04-09 09:55 +0100 |
| Message-ID | <mailman.9063.1397034008.18130.python-list@python.org> |
| In reply to | #69911 |
On 09/04/2014 01:02, alex23 wrote: > On 9/04/2014 3:29 AM, Chris Angelico wrote: >> My code would make for terrible PHP. :) > > Don't feel bad about that. It's a truism for every language, including PHP. Yep. And the worst thing about terrible code is when you first realise just how bad it is and wonder why you wrote it like that in the first place. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
[toc] | [prev] | [next] | [standalone]
| From | alex23 <wuwei23@gmail.com> |
|---|---|
| Date | 2014-04-10 10:41 +1000 |
| Message-ID | <li4pbe$ruv$1@dont-email.me> |
| In reply to | #69936 |
On 9/04/2014 6:55 PM, Mark Lawrence wrote: > And the worst thing about terrible code is when you first realise > just how bad it is and wonder why you wrote it like that in the first > place. For me, it's nearly always due to time constraints. Usually caused by a comment like: "we absolutely need this extensive feature added before launch, can you start it right now? oh and we're still good for release tomorrow, right? Because we promised the client etc etc etc"
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web