Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Crime

Journal Journal: Handling older juveniles accused of serious crimes

Handling older juveniles accused of serious crimes

Most states try to certify older juveniles arrested for serious crimes as adults. "You do an adult crime, you do adult time," as the saying goes.

The human brain's moral centers don't reach full adult maturity until the early or mid-20s. This is reflected in our law and legal history.

Until the Vietnam era, some states would not let you vote until you turned 21. The logic was that young adults were too immature or ill-informed to vote responsibly.

While we now give anyone old enough to serve in the military without his parent's consent the right to vote, we have taken away the right to buy or consume alcohol without parental supervision. We did this because we saw that way too many people under 21 were using alcohol irresponsibly and killing or maiming themselves and others as a result. Prior to the laws being changed, people over 21 drank irresponsibly and killed people at a significantly lower rate than those under 21.

Knowing this, we need to change our court system so those convicted of crimes done before age 18 are at least offered a path to rehabilitation and, once their complete sentence, parole, and a possible short period after parole is complete without any new crimes committed as an adult, the assurance that their records will be sealed.

At least one state has implimented the option of a "determinate sentence" for youth over a certain age but young enough to be tried as a juvenile. Here is how it works:

* The prosecutor decides not to ask for an adult trial OR a judge turns him down
* The youth pleads guilty or is convicted and given either a "determinate sentence" of a stated number of years or decades, an "indeterminate" (traditional) youth sentence which means he gets out by a certain age or sooner, or a non-prison sentence such as home confinement or youth probation.

Assuming he gets a "determinate sentence" and is not yet old enough to be transfered to an adult prison:
* The youth goes to a youth correctional facility with a focus on rehabilitation
* If the youth serves enough time to be paroled before becoming a young adult, he MAY be paroled
* Under some situations, the youth may be paroled or discharged when he becomes a young adult
* If the youth is not paroled or discharged at this time, he is transferred to adult prison
* The now-adult inmate will eventually become eligible for parole if he his not already
* The inmate or parolee eventually serves his stated sentence and parole and is discharged
* The juvenile record is sealed

That last item is key. It's the "you can start your life over now, the mistakes of your immature-brained youth are forgiven" element that any society with a moral compass will have as part of its juvenile justice law.

Crime

Journal Journal: Reforming Criminal Statutes of Limitations: A Phased-In Approach 1

Reforming Statutes of Limitations: A Phased-In Approach

Current statute of limitation laws are "all or nothing."

If the prosecution decides to file charges 1 day before the time limit expires, you can get the full sentence, even if you've been a responsible citizen for years after the crime.

But if they wait one day later, you are off the hook.

This is unfair to the guilty party and to society.

The purposes of statutes of limitations include:
* encourage swift justice, discourage prosecution laziness
* give people who have committed long-ago crimes some certainty that it really is behind them, at least with respect to criminal charges

====
A phased-in approach would be better.
====

Set an initial time period based on the minimum sentence, within a range of 1-10 years. Any charges brought before this time expires would not be affected by statutes of limitations.

Set a maximum time period based on the maximum possible sentence PLUS the initial time period. Any charges brought after this time period could be tried but there would be no prison term.

If charges are filed between these times, the trial and sentencing would be carried out as normal, but the newly-convicted criminal would be given day-for-day credit for time served for each day of delay after the initial period expired. The fact that he would be given such credit could not be used against him during sentencing or parole-eligibility or mandatory-release determination. However, the parole board can decide he hasn't spent enough time behind bars and deny parole up to but not past his mandatory-release date, if any.

====
Some examples:
====

A person committed second-degree murder 12 years before charges were filed. The law says the judge can sentence him from 2 years on the low end to 20 on the high end. The judge sentences him to 15 years. He gets 12-2=10 years of credit, so his effective sentence is only 5 years even though his criminal record will show a 15-year sentence.

A person stole a car 25 years ago. The police found the car with DNA but "John Doe DNA" indictments aren't allowed for property crimes in that state. 25 years later the same guy is arrested on a relatively minor felony. He is convicted and gets 1 year on the new felony. He could get 2-20 on the old car theft charge. He's charged and pleads guilty but no matter what the judge sentences him to, since 25-2=23 is more than the maximum sentence he will not serve any prison time for the car theft. He will, however, have a second criminal conviction on his record. If he later commits a third felony he may face serious prison time under "3-strikes" laws.

====
====
Some special considerations:
====
====

====
Tolling the statute of limitations:
====

Current rules on tolling would not be changed. Most states toll the statute of limitations for:
* Fleeing the jurisdiction
* Legal incapacity of a key witness, such as being a minor or medically unable to testify
* Intimidation or perceived intimidation of a witness, such as if the victim is financially or otherwise dependent on the alleged criminal
* An ongoing criminal enterprise
* Judicially granted extensions for an ongoing investigation
* "John Doe" indictments against the person matching a DNA sample, photograph, or other evidence that is presumed unique to the alleged criminal
* Any pending charge, once an indictment or equivalent is made

====
Reduction of charges by the prosecutor:
====

The prosecutor would be allowed offer reduced charges before conviction while allowing an effective sentence up to the same as if the original charges were filed (but no more than the maximum actual sentence on the reduced charge). Take the murder case above: The prosecution could offer a plea of manslaughter, which carries a 2-10 year sentence, on the condition that the person accept a 10 year sentence but serve the same 5-year effective sentence he would serve on the more serious charge. If it was to his advantage, the newly-convicted murderer could ask the parole board to treat him as if he had served 75% of a 20-year sentence.

To prevent abuse by prosecutorial bullying, if the effective sentence on the lesser charge under this rule is more than the effective sentence if the lesser charge had been the original charge, the actual plea would be the legal equivalent of pleading guilty or no contest to both charges with a judge acting on the prosecutor's motion to dismiss the higher charge. Since all pleas are under oath, a prosecutor encouraging a false plea is suborning perjury.

====
Reduction in charges by routine clemency:
====

A modified version of this would reduce the charge to match the maximum effective sentence, or to some "minimal" charge if the maximum effective sentence was zero as in the car-theft example above.

For example, if routine clemency were offered, the murderer would still be stuck with his original charge since 5 years is within the sentencing range for his crime. But the car theif would have his charged administratively reduced to the highest felony theft charge that allowed probation of 1 day or less, or to a special charge created by lawmakers for this purpose.

====
Effective dates of discharge and release when considering post-release and post-discharge conditions:
====

The date of discharge is no later than what the date of discharge would have been if the person had started serving the maximum sentence on the day the initial time period expired, plus extensions for tolls of the statute of limitations.

For example, if a person committed 2nd degree murder in 1970 and could have received 2-20 years, any conviction today will be considered to have been discharged in 1992.

If there are any post-discharge conditions or legal disabilities that are based on time, he will be given credit for all time since 1992 towards fulfilling these conditions and towards the eventual expiration of these legal disabilities.

====
Ultimate expiration of the statute of limitations
====

Allow only a specific period of time, such as 5 years for felonies or 1 year for misdemeanors - after the time where all legally-imposed time-based post-discharge penalties will have expired to file charges.

This allows prosecutors a short additional window to gain a "symbolic" conviction or to brand someone a criminal years or decades after a crime, while giving society a "date certain" beyond which they won't have to interrupt their lives to face possibly-false allegations of long-ago alleged crimes in criminal court.

====
Effect on fines
====

This plan is not designed to change the fine schedule.

====
The bottom line: The practical effect
====

Some example crimes and the effect of this change on them:

Petty crimes: Maximum sentence of 1 year or less:
1 year to bring charges to get the full maximum sentence.
2 years and a day to bring charges at all.
Latest discharge date after back-dating applied: 2 years after crime committed.

Higher-jail-time crimes: Minimum sentence 1 year or less, maximum sentence 2 years, no post-discharge conditions
1 year to bring charges to get the full maximum sentence.
3 years and a day to bring charges to get any jail time.
This is also the latest release date and the latest discharge date if the discharge date is back-dated.
4 years and a day to bring charges at all.

Low-prison-time crimes: Minimum sentence 2 years, maximum sentence 10 years, 5 years of post-discharge conditions
2 years to bring charges to get full maximum sentence.
12 years to bring charges to get any prison time.
This is also the latest release date and the latest discharge date if the discharge date is back-dated.
17 years to bring charges to get any post-discharge conditions.
22 years to bring charges at all.

Medium-time prison crimes: Minimum sentence 5 years, maximum sentence 40 years, 10 years of post-discharge conditions
5 years to bring charges to get full maximum sentence.
45 years to bring charges to get any prison time.
This is also the latest release date and the latest discharge date if the discharge date is back-dated.
55 years to bring charges to get any post-discharge conditions.
60 years to bring charges at all.

Very serious felonies less than life: Minimum sentence 10 years, maximum sentence 99 years, up to 25 years of post-discharge conditions
10 years to bring charges to get full maximum sentence
109 years to bring charges to get any prison time
This is also the latest release date and the latest discharge date if the discharge date is back-dated.
134 years to get any post-discharge conditions
139 years to bring charges at all

In practical terms:

If the person COULD have received a sentence that would have had him in prison for the rest of his life if he'd been charged by the end of the initial period, there is no statute of limitations.

If the person COULD have received a long sentence that would've had him under post-discharge conditions for the rest of his life if he'd been charged by the end of the initial period, he'll live to see daylight but there is no statue of limitations.

Crime

Journal Journal: Don't write off criminals when it comes to hiring and housing

Don't write off criminals when it comes to hiring and housing

In some states a felony record is a de facto bar from renting decent apartments or getting decent jobs for life.

A more reasonable approach would be to limit how employers and those providing routine services to the public could treat you based on how long it has been since you were in prison, on parole, or on a parole-like supervised release.

Absent special situations such as those listed below, I recommend the following as a STARTING point for how to treat ex-cons when it comes to housing and employment:

Anyone on probation or parole: Positive, neutral, or negative recommendaiton from probation or parole officer should override time-since-discharge.

Anyone who has made himself accountable to another person or group in a legally-binding way that is accredited by the state: Positive, neutral, or negative recommendaiton from probation or parole officer should override time-since-discharge.

Anyone who has made himself accountable to another trustworthy person or group other than above: If the person or group can be trusted, their positive, neutral, or negative recommendaiton from probation or parole officer should override time-since-discharge.

Anyone discharged person not on parole or probation and not under legally-binding accountability who had at least 3 years of such supervision, whose last 3 years showed consistent positive recommendations, and who has had no negative indicators during those 3 years or since: Treat as a positive recommendation.

Anyone discharged person not on parole or probation and not under legally-binding accountability who had at least 3 years of such supervision, whose last 3 years showed consistent positive recommendations, and who has had no negative indicators during those 3 years or since AND who has been discharged from the legal system for 3 years for a misdemeanor or 5 years for a felony: Consider rehabilitated.

Anyone discharged from the legal system for 5 years for a misdemeanor or 10 years for a felony and no negative information during that time: Consider rehabilitated.

Anything in between: Treat it on a case-by-case basis. While summarily denying housing or employment based only on criminal activity may be efficient from the landlord's or employer's point of view, it is very inefficient from society's point of view. Although they may not be able to measure it, the landlord and employer pay "their share" of this inefficiency every time they turn down someone just because of a criminal record. If every landlord and every employer would do "their part" and not automatically disqualify criminals except where required by law, society would be better.

====
Special situations that might require special handling:
====

* Parole and probation officers and others who are known to "grade high" or "grade low" or who are not willing or able to justify their assessments
* Anyone with a recent history of gang involvement
* Anyone with an offense against another person can't demonstrate he is a low risk of hurting people again
* Anyone with a recent history of lack of self control that is likely to lead to criminal acts affecting housing or employment
* Anyone whose specific criminal history legally disqualifies him from a particular job or for promotion opportunities expected to be earned by those holding the job
* Anyone whose specific criminal history legally prevents him from residing in a particular location
* Anyone with a current or only-recently-resolved emotional issues which this job or housing situation may re-trigger, but only if such issues are likely to impact the housing or employment in question or are more likely to result in a parole or probation violation, or result in a new criminal offense than denying the employment or housing in question. For example, expected absenteeism due to violating probation is grounds for denying employment.

====
Some legal changes that should be made to make this happen
====

Landlords and employers should have general immunity from civil lawsuits if they rent to or hire a person with a criminal record, provided that they make a good faith effort in all of these areas:
* The employer or landlord checks the employee or tenant's recent (last 7-10 years for felonies, less for misdemeanors) public criminal record.
* If the employer takes risks that are ALREADY considered by applicable law to be "high risk," he either provides risk mitigation or alerts affected parties so they can manage their own risk. For example, a white-collar crook with access to a company's books requires either checks and balances to prevent fraud or notification to all stockholders so they can sell or vote to fire the management if they choose. A landlord renting to a person with recent criminal convictions for gang activity or any such convictions and any known recent gang-related behavior should forward this information to local police so they can step up patrols.
* If a landlord or employer has a significant concentration of criminal tenants or employees AND as a group the total tenant base of the property or the total employment at any one location during any one shift represents a significantly higher risk to anyone as compared to a property or location of employment with a randomly-selected group of individuals, the employer or tenant either mitigates the risk or alerts those put at risk that they need to watch their back.

Landlords and employers should be financially encouraged to house and hire those straight out of prison.

All inmates approaching a possible release date and all recently-released convicts should be given free access to credentialed rehabilitation specialists who are funded well enough to do their job right. These specialists will be in a position to provide positive, neutral, or negative recommendations regarding the suitability of a particular individual for a particular housing or employment situation from a public-risk perspective. Such individuals should have legal immunity for making a recommendation that later turns out to be incorrect.

Facebook

Journal Journal: Funny ad on slashdot.

Wondering why I don't block ads on slashdot? It's not just because slashdot makes a bit of money that way, but also because sometimes they're just too funny.

Today's example, following up on yesterdays Facebook IPO flop, reads:

Invest in Facebook Now

In just a few days, Facebook will sell its stock to the public one(sic) of the biggest IPOs in Wall Street history.

Sadly, if you invest in Facebook after it goes public, you're going to be too late.

But if you act TODAY, you can take advantage of a secret way to invest in Facebook BEFORE it goes public ...

Get more details immediately.

What a joke. The site pimping this is streetauthority.com - another stock shill with clueless predictions that FB "could" be worth $70 a share. Try telling that to the underwriters who had to buy back millions of shares at $38 so it wouldn't drop below the issue price. Manually entering the final url w/o the junk gives an IIS error page saying that the requested page has been moved. Don't blame them, really :-)

Facebook

Journal Journal: The real consequences of the Facebook IPO flop. 13

Facebook's IPO was a flop - the only reason the shares didn't end the day on a negative was that the underwriters bought millions of them at the floor price, to support the stock.

Even Groupon, which is now trading at less than a 3rd of its' first-day high, closed over 30% higher than it opened.

So now the underwriters are sitting on millions of shares of FB at $38 apiece. In other words, instead of taking in $171 million in fees, they traded back those fees (and then some) for FB paper that nobody else was willing to buy at $38 a share by days end.

Ignoring the question of the underlying value, which is much less than the IPO valuation (but that's another story), how much is FB worth to someone playing the market? Zynga has been used as a proxy for FB for a while - if you couldn't buy FB stock, at least you could buy their major partner, Zynga.

Trading in Zynga was halted - twice - because of 10% price declines in the stock in a 5-minute period. In other words, Zynga would probably have gone still lower if trading hadn't been halted. Zynga ended the day down "only" 13.42%.

Since the only thing that kept FB shares from going through the issue price floor was massive price support by the underwriters, Zynga continues to be a valid proxy for what Facebook stock would be performing if it weren't for the underwriters intervention.

What does this mean to the underwriters? Realistically, not only did they not make any net income from FB, but the shares they bought back at $38 will be a hard sell at $31 over the next few weeks.

Their only real option is to slowly sell off the shares, a little at a time, in competition with the other half-billion shares, many of which were bought in anticipation of a quick profit on a first-day market "pop" that was over almost as soon as it began.

There's also a limited window of opportunity. 6 months from now, all those Facebook employees who can't sell their shares because of the 6-month lock-in will also be wanting to cash out at least some of their $$$, so that leaves 6 months to unload, while many of the people who bought half a billion shares also look to unload.

None of this takes into account the FB employees who took out loans against their stock grants. This secondary market just got risk-ugly.

So, who benefits? Microsoft, Apple, and Google.

Microsoft, because Facebook is now just another stock, and one that doesn't even pay dividends, so competition with Facebook for employees just got easier. Bing will also pick up some advertisers who are re-examining their committment to FB in light of the triple whammy of GM pulling out, the $15 billion lawsuit, and the FB IPO flop showing that investors don't have that much confidence in future FB growth being anything like the past.

Apple, because people will continue to buy iPads, and iPad users tend to use Facebook less (eventually just responding to birthday reminders and such, at least from what I've seen). Anything that makes FB look like yesterdays news makes Apple's ecosystem look more attractive.

Google, because not only are they now, like Microsoft, going to have an easier time competing for talent, but also because of the dark shadow (think "negative halo effect") the FB IPO dud will have on Facebooks credibility with advertisers, just a few days after GM pulled out of paid FB advertising because it's not worth it and the rumours of other big-name advertisers who are also ready to pull the plug. That money will go to Google, and to some extent, to Bing.

The big loser, of course, is nowhere to be seen. It's anyone on whom Morgan Stanley, JPMorgan and Goldman Sachs dump the overpriced FB paper they're now holding.

On another note, it'll be interesting to see what, if anything, the underwriting banks do with their new positions as significant shareholders of Facebook. They could make Zuckerbergs' life "interesting."

Plus there's the impact it will have on the economy just from reduced expectations all around, and the increased reluctance to invest seed money in other tech ventures.

Oh, and let's not forget the impact on the whole "social media" bubble. That hissing sound you hear? It's the air coming out. FB looks a lot more vulnerable than it did just 24 hours ago.

Canada

Journal Journal: My new career path. 24

More here.

As a bonus , I'll probably soon reveal the unbelievable story of how I acquired my legal knowledge - by doing something nobody else ever has, and which, until now, would be considered pretty much impossible.

I'd rather not, because there is some danger involved, but it's necessary to achieve my goals in an open and transperent fashion.

Advice and help sought and welcome.

Canada

Journal Journal: Time to switch careers - politics it is! 4

Since programming is now out as a career (over 35, problems with my retinas), I'm going to that refuge of all useless humanity - politics.

Seriously, I've been thinking about it for some time, and level of corruption of the local government is depressing. Not only that, but they've done some pretty nasty things to me over the years, and I'm tired of it.

What ultimately tipped the scales, though, was that I stopped by the hospital to talk with two women who work there on my way to visit one of my sisters, and we got to talking about how the government is trying to fudge its books by artificially inflating apparent receivables.

The latest scam: Sending out notices of tax re-assessments for the last 25 years to the spouses of people who have died. Totally illegal (there's a 10-year limit here). They recently tried this on one of my relatives. Anywhere else, I wouldn't believe it. Quebec - hey, this is just business as usual for Canadas' most corrupt province.

Under this scam, the workers of that department get their bonuses for meeting targets for "enhancing receivables", and if the money never gets collected, that's just another departments problem.

For those just joining in, it's gotten so bad that I had to sue the government when they illegally (and wrongly) tried to claim that I owed $70,000 in a separate matter. The judge agreed that I didn't owe a single penny and that the seizure of my salary was totally illegal, but having to spend money to sue the government when they're illegally lopping of 1/3 of your pay before taxes is not for the faint of heart.

Most people would have taken the lawyers advice and taken the settlement, rather than firing the useless turdle and arguing the case themselves.

It turns out that one of my friends who works at the hospital is also being hounded by the government. Even though she only works a few days a week, they're seizing her salary, and her attitude was "it's the government - nobody wins against the government." Until I talked to her, she was just resigned to paying it - doesn't matter if she actually owes it or not.

I had just come from my lawyers' (yes, I sometimes let lawyers fight my battles for me) because I have to sue the government again (I must be on some list or other ...), and really, that's the last straw. It's not just me. It's not just a few people. This corrupt government has its' claws into everything and everyone.

The feds turning a blind eye makes them just as bad.

We currently have a corruption commission getting underway (one the government resisted, then tried to severely hamstring). It won't be enough. We've been there before, and the political will, and the ANGER, just isn't there. People are resigned to "business as usual."

I'm not. I've taken all the crap I'm prepared to take. I've got dirt, and I'm going to use it.

User Journal

Journal Journal: Signature line update 2012-04-23

Signature line starting 2012-04-23:

Base 13 math: "What do you get if you multiply six by nine?" / "Six by nine. Forty two." / "That's it. That's all there is."

Previous journal entry containing historical sig lines: http://slashdot.org/journal/94557/my-sig-lines

Open Source

Journal Journal: Yet another open source failure 14

Trying to print an envelope address in openoffice under linux? What a waste of time.

Do the people who code this sh*t actually ever use it? Or do they never use anything else, so they simply don't know that it's possible to do better?

Easy prediction - open source will never be competitive. When it's so bad that I'm tempted to throw a copy of XP (or even Wn95) on the box because linux on the desktop is still 2 decades behind the times anyway, there's a fundamental problem that obviously will never be fixed.

I really hate them, but my next computer is going to be a mac.

The Internet

Journal Journal: Every browser is *still* broken. 17

After 15 years, we still don't have an un-b0rked browser. CSS 2.1 was done in 1997, and yet firefox, opera, chrome, arora - they all render differently for non-trivial layouts.

15 years, and they still can't get the basics right. It means that the problem is not the implementation, but the underlying concepts that are flawed in fundamental ways.

And there's no blaming Microsoft or Apple for this fiasco.

No, we did this to ourselves. We're all suckers. The people setting the standards did it wrong, and we didn't immediately stone them to death, salt their fields, enslave their families for the next 3 generations, and all that other "Carthage must die!" goodness.

So we have let ourselves become slaves to stupidity.

What a waste of time, energy, brain cells, and just general aggravation. Have fun with html5 + css3, folks - you'll never see it finished in your lifetime, not even if you live for another 100 years.

Apple has it right - apps, not a stupid one-size-fits-nada web browser. Just like they have it right about not releasing stuff until it's good and ready.

Stupid browsers. Stupid us.

Programming

Journal Journal: NoSQL+ sprintf() == better. 7

Old technology doesn't die - it get re-implemented when newer ways get too bloated and turn everything it touches into Beavis and Butthead.

In the dying days of the last century (awk! - how time flies) I used to do web cgi using c, same as a lot of people. Used malloc and sprintfs() to insert variables into a "template" and then printf()s to output. It was easy to track memory allocation for such cases, so the whole "OMG you'll leak memory" issue was a non-starter.

And then along came the attack of the killer web scripting "pee" languages - php, perl, and to a lesser extent, python. The concept of a "templating language" evolved and eventually we ended up with "templating engines" - megabytes of code to make up for the shortfalls of the approach.

For example, output buffering. php includes stuff like ob_start() because even one stray newline emitted will prevent you from setting cookies on the client. c/c++ cgi programs didn't worry about a stray newline being output by an #include file because only printf() and putchar() would actually write stuff to stdout - so as long as you were just sprintf()ing to your format strings you were all good. In php, even one space before the opening tag or after the closing tag in index.php and you're hosed for sending cookies (which is why you should always omit the closing tag - the spec allows it).

Another advantage was that the ONLY character you needed to escape in any file you loaded as a template as a sprintf format string was the % symbol. No worrying about single or double quotes, angle brackets, or whatever.

For user input, the only sanitation needed was the left and right brackets (to prevent someone from entering raw html, such as script tags) and, again, the % symbol. No "escape_string", no "real_escape_string", no "really_really_escape_string", since the data was stored and read w/o needing sql.

In terms of performance and memory use, sprintf() easily beats regexes. You really can't help but notice the difference. And it sure beats the so-called "compiled templates" produced by templating engines like smarty.

Yet another advantage is portability - any language that supports sprintf() can be used w/o modifying your template files. This means that if you need the best possible performance on some really really HUGE files, you can always do it directly from a shell in c, or if you're so inclined, java.

So I decided to re-implement my old approach from scratch yesterday in a couple of hours in php. The entire code - including for variable range-checking, reading and writing data (strings and arrays), meta tag files, html, reading and parsing config files, getting and setting cookies, posts and gets along with verification and using sane defaults and coercing the values to those default types, loading templates, creating those little "go to page 1 2 3 4" clickies for larger web documents and everything else, is under 9k, including the site's index.php file.

THAT is a lot more maintainable than the 1.1 meg download for smarty templates (and smarty doesn't do the reading and type coercion from the client or the minmax range checking or some of the other stuff).

So, +130 files for smarty, or 2 for the old way (and one is index.php,so it really doesn't count ...)? Oh, and the template files look a LOT cleaner. For example, no embedded program logic like {include file='whatever'} in the templates, so stuff like

<input name="first_name" value=$smarty.get.first_name> // no default values!!!
<input name="last_name" value=$smarty.get.last_name> // no type coercion!!!
<input name="address" value=$smarty.get.address>
<input name="city" value=$smarty.get.city>
<input type="submit" value="Save">
<input type="reset">

becomes:

<input name="%s">, etc ...

... so your template looks like this instead:

<input name="first_name" value="%s">
<input name="last_name" value="%s">
<input name="address" value="%s">
<input name="city" value="%s">
<input name="age" value="%s">
<input type="submit" value="Save">
<input type="reset">

and your index.php file looks like

<?php
$BASE = '../'; all files live outside of public_html space
include "$BASE/php/libfoo.php";

$HTML = read_tpl("test_page"); // read_tpl automatically prepends "$BASE/tpl/", appends ".tpl" extension.

$css="my_skin_2";
$js = "new_js_lib";

$head = read_tpl("head");
$meta = read_meta("test_metadata");
$desc = $meta[0];
$keywords = $meta[1];

// want to test a new skin, new javascript libs
$HEAD = sprintf($head, $desc, $keywords, $css, $js);

$form = read_tpl("junk");
// get, post, cookie, gpc_pg, etc all sanitize the %, < and > symbols.
// also use an optional default value, and coerce any entered data to that type,
// so, if you ask for an integer and specify -42 as the default, anyone entering "FOO" returns -42
$first_name = get('first_name', 'Enter first name here');
$last_name = get('last_name', 'Enter first name here');
$address = get('city', 'Enter address here');
$city = get('address', 'Enter city here');
$age = get('age', -1);

// do any additional validation, data manipulation, etc.
// no need to do output buffering ... it's all in memory until you do the next line.
$FORM = sprintf($form, $first_name, $last_name, $address, $city, $age);

$footer = read_tpl("footer");
$FOOTER = sprintf($footer, "have a nice day!");

//okay, now write the whole thing
printf($HTML, $HEAD, $FORM, $FOOTER);

There is zero programming logic in the template itself - and that's the way it should be. Templates like smarty fail in the "presentation should be separate from code" department.

Plus, since most templates won't include variable names. they're pretty generic, again promoting template re-use. The footer, for example, could contain the output of several other templates instead of a simple message, and you'd never touch the main page template OR the footer template.

Operating Systems

Journal Journal: Bad news for Windows and Linux 9

Remember how Apple captured a generation of users by concentrating on getting their computers into schools? You ain't seen nothin' yet.

One trend that I haven't heard a peep about is how mothers and grandmothers are using their iPhones and iPads to play with their kids. I'm not talking grade-school children, but babies under a year old. I have yet to see a parent do this (play with their baby) with a non-iOS device.

Cradle to grave, these kids are going to think a "computer" is something you buy from Apple, and anything else is a cheap knock-off (which is too true nowadays, btw).

Microsoft will still manage to hang on in the business world, but android? Not a very good future in either smartphones or tablets, unless you want to talk about the lower end. Androids' continued fragmentation problems mean Apple will continue to be the one to beat.

Android on TVs? Nobody wants a "socially networked TV". That's what they have their iPads and iPhones for. TV is for vegging out, for background noise when doing homework or housework, or for playing games. So even if/when android comes standard on most TVs, it's going to be like the clock on those obsolete VCRs - always blinking 12:00:00 because nobody bothers to configure it.

Medicine

Journal Journal: Time to take on DrugCo (Merck) 4

Olmetec and Benicar (Olmesartan medoxomil)are a $2.5 billion a year industry. I was on Olmetec for 3 months, and let me tell you, the side efffects were nasty.

I stopped taking it a month ago, and am pretty much recovered from it, aside from still feeling like I want to take a nap once in a while, but at least the bone-crushing tired-all-the-time can't-stay-awake for more than 6 hours a day even after 6 cups of coffee feeling is gone, along with the other nasty side effects.

There are people who have reported similar reactions, but I suspect that shame keeps them from reporting the worst one - after a couple of months dealing with it, and the depression that it threw me into (another side effect that patients have reported that is not mentioned in the product monograph), I experienced the same suicidal ideation that a few others have reported. Now, considering that I've been through a lot worse and have never spent weeks in a deep dark funk thinking about offing myself, there's a problem with this drug - especially since when I stopped using it, those thoughts went away.

In my email to them, I asked what they proposed to do about this - and about the lack of warnings to either physicians or patients, esp. when there have been similar reports since at least 2009, along with reports of gradual short-term memory lost and other problems, and that two studies have shown that it also presents up to a 5-fold increase in sudden death from stroke in patients who are diabetic.

The argument from the FDA review of these deaths was that the benefits of reducing non-fatal strokes mostly outweighed the risks. That's like saying that you have a car with a steering wheel that will let you either walk away from an accident, but with a much higher risk that it will gut you instead, with no middle ground, and no, we won't tell you that it is much more likely to kill you. Or that for certain trips, maybe you should take a different vehicle. And that diabetic patients and their physicians should be looking at other options.

Their response was the usual corporate mumblings. Lots of words to avoid actually saying anything. I'll be posting it on the net sometime tonight or tomorrow, along with the ROADMAP and ORION studies, and the FDA response.

It's interesting that since the FDA review last year, some of those who said "overall, it's worth it" are now not so sure ...

And yes, I am certainly both upset and angry about this, now that I can see it for what it was.

User Journal

Journal Journal: I guess I'm PMSing a bit ... 6

... or that I'm fed up that I went to check my email after spending most of the day away from the computer, and I get yet another SEO con artist from India sending more spam offering their crappy services - stuff anyone who can throw together a few meta tags and a sitemap.xml file can duplicate.

So corporatesales@web-seo-proposals.in got the following reply:

Hi:
Kindly go fuck yourself. Preferably with a dildo covered in barbed wire. Repeatedly.

It's rare that I swear, but I'll make an exception in their case. And cut-n-paste it into a few of the many others in the inbox.

They also operate under the name ethical-seo-comapany.com (no, the typo is not mine - they actually don't know how to spell company).

Just make sure you check the headers before doing anything similar to make sure the spammer isn't really someone pulling a joe job.

The rest of them got this enhanced versin:

Hi:

Kindly go fuck yourself. Preferably with an aids-infected dildo covered in barbed wire. Repeat until you remove yourself from the gene pool.

Medicine

Journal Journal: Good news, bad news ... 7

The good news - doctors visit yesterday, and got the results from my latest labs. It turns out that going off that evil blood pressure medication was a smart move - my bp is lower now than when I was on it. He asked what I was doing, and I told him that every once in a while I would stop and remember to just "clear my head and RELAX!!! NOW!!!! DAMMI!!! :-)"

No need for meditation or anything like that - just thinking of something better for 30 seconds or so, to "break the cycle." It works.

I've never bothered worrying about cholesterol, but out of curiosity I asked, since it's a problem for other family members - turns out mine is just fine, as is my long-term blood glucose level.

Und now, ve haf zee bad newz! Stupid eye started bleeding again yesterday morning. It's still sore today, so I'm limiting myself to 15 minute intervals, with an hour breaks. Oh well, can't win them all.

Slashdot Top Deals

"If I do not want others to quote me, I do not speak." -- Phil Wayne

Working...