Skip to content

u/just4this

In this archive from Sep 2008 to Apr 2012

2
posts
36
comments
2
media
243
score

TV executives are a weird bunch. A show like Heroes staggers on season after season but shows like Pushing Daisies, Wonderfalls, and Dead Like Me get the axe pretty quickly.

I'm hoping that old-fashioned product placement ("Have some Carnation Evaporated Milk with your coffee George?") will provide enough money and the Internet can provide the low-cost access to audience so that the good shows with limited audiences can survive.

5 points

I'll make the assumption that you're still using PHP

Bad assumption. I went to work for IBM in 2001 doing project management of Beowulf cluster installations and then for six years I was CTO of a company providing an automation/integration platform for the healthcare industry. I'm currently semi-retired. Mostly I'm interested in Groovy but I dabble in a few other languages.

No disrespect, but I'll remain sceptic to that claim.

Like I give a shit? No disrespect, of course. :-)

I'm unsure what value it gave to the discussion other than providing me with random trivia.

Sorry, I thought you had a general interest in PHP. The main point was that I started PHP when a lot was not known about web programming or PHP.

Relying on the index position isn't always reliable

It's 100% reliable unless you don't specify the columns in your select statement. Only neophytes fail to do that.

Encapsulation. When working with a template engine, you might not know which fields are actually going to be used, and in what way.

In that case what's the point of your names either? If you name the variable you have to use judgement. All you have done is add characters: "$row['foo']" v "$foo". The letters 'r', 'o', 'w', and the symbols '[', "'", and ']' add no information, don't change the reliability of any statement, and clutter the code. Of course, I like the ternary operator too so perhaps I'm more sensitive to clutter that most.

1 points

I agree, a templating system is usually better. However, I started writing PHP in 1995 (I'm the guy who discovered and named "variable variables" - when I told Rasmus about it he was quite surprised but that, upon reviewing the code, he could see how it was happening) and the templating systems when I was full-time active with PHP ranged from bad to non-existent.

It's a personal thing but I find associative arrays ugly compared to just using a simple variable as I've done. I don't find that the characters "row['']" add anything and so I just use the remaining characters such as $url.

My example used the mysql function because that's what was current when I was writing a lot of PHP (it actually didn't exist when I started because MySQL didn't exist - we used mSQL at that time or Postgres95 and Perl) and, as a result, it was natural for me to use it in a contrived example.

2 points

I seem to use list() more than most people. I also use ' in my HTML instead of " because it's allowed and it makes it easier to to do this:

while (list($url, $name) = mysql_fetch_array($res)) {
  print("<a href='$url'>$name</a>");
}

(It's been a while so I forget, there may be the need to uses an "@" to suppress an error when the last fetch is attempted.)

I really hate seeing code like this:

while ($row = mysql_fetch_array($res))
  {
    printf("<a href=\\"%s\\">%s</a>", $row[0], $row[1]);
  }

It's not the use of printf() I object to, it's the unnecessary and uninformative use of $row[] and the the unnecessary and ugly use of " when ' would have done. Of course, the hideousness of the abusive formatting screams for itself! :-)

EDIT: I'm having some trouble with formatting the ugly example. There are supposed to be double-quote marks being escaped by the back-slashes. I've tried escaping the backslash but that only changed the problem, it didn't fix it.

EDIT2: I'm leaving it at this. Ignore the white-space after the back-slashes.

0 points

As someone who used to be paid by the DOE and Westinghouse to do climate research I can tell you for an absolute fact that scientists get more money when their results say "oh shit we're all gonna die!" than when their results say "everything is fine, nothing much is happening".

It doesn't matter if you are researching global warming or H1N1, bad news gets more money.

3 points

I had been taught that either can only be used to indicate a choice of one of two. I am completely certain that's the way it was taught 45 years ago.

However, the down-modding I have received and your question made me go out and research the current rule on this and I found the following:

either of more than two. A traditional rule holds that either should be used only to refer to one of two items and that any is required when more than two items are involved: Any (not either) of the three opposition candidates still in the race would make a better president than the incumbent. Remember that the rule applies only to the use of either as a pronoun or an adjective, as in Either computer will run the software. When using either as a conjunction, you can apply it to more than two elements in a series: She left her glove either at the convenience store, the library, or the playground. Either the union will make a counteroffer or the owners will close the factory or the mayor will intervene.

The second usage grates on my nerves completely. I was taught to say She left her glove at the convenience store or the library or the playground. and The union will make a counteroffer or the owners will close the factory or the mayor will intervene.

At that time, or only meant exclusive or and when I was taking logic pains had to be made to get the class to understand that inclusive or makes sense.

Time marches on and language is a human construct that is not static.

13 points

Growing up, he was the greatest influence on me with Lillian Lieber and the Star Trek character 'Spock' coming in a close 2nd and 3rd.

I am trying to get my kids to read at least a few of Heinlein's books. In particular, I want them to read Have Spacesuit, Will Travel, Citizen of the Galaxy, and The Moon is a Harsh Mistress (given their ages).

2 points

A company I hope to do some outsourced work for is in the process of trying to figure out if there is anything at all patentable about what they are proposing to do.

The reason for the effort is that the potential investors only want to invest in things that have IP that can be protected. The would-be investors don't want to hear about 'first to market' or anything else except 'patented'.

So:

  1. Dream up damn near anything.
  2. File a provisional application for patent.
  3. Use 'patent pending' to impress ignorant people with too much money.
  4. Profit!
4 points

It was Ethernet 10Base2 aka Thinwire which is a sort of coax cable with terminators on the ends. Cutting the cable not only isolated one part of the network from another but it also introduces all sorts of weird transient problems as the terminators at each end of the cable are there to suppress electromagnetic echoes from would otherwise be open ends like where he cut.

3 points

At the U of SC we once had our network go down hard. After quite an effort we found the problem: a professor had gone on sabbatical and he was worried that the turned-off MS-DOS PC in his locked office might be hacked into via the network while he was gone.

So he cut the thinwire connection to his PC (and I do mean 'cut', not 'unplugged').

18 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.