Monthly Archiv: May, 2019

Site News: Popular Posts for This Week (05.03.2019)

Popular posts from PHPDeveloper.org for the past week:

What My Old Design Projects Have Taught Me

If you take a look back through your portfolio, what do you see? Maybe it brings back memories of a certain challenge you faced or a really difficult client. Perhaps you cringe at the sight of a dated look or now-extinct technology. I hear you.

Over the past couple of decades, my career has had its share of hits and misses. And, for the longest time, I was really embarrassed when looking through some of my older projects. But time brings perspective and you start to see things in a different light.

Because, regardless of how a particular project turned out at the time, it was a learning experience nonetheless. As I think back to the variety of sites I’ve built, I wanted to share some of the most important lessons that came from them.

So, in no particular order, here are some valuable things I’ve learned from past projects.

Code Can Be More Resilient Than You Think

In the past few years, I’ve found myself retrofitting some older websites for responsiveness. These sites were built in the days before smartphones really changed the world, and it was important that they at least looked and functioned well on small screens.

What I discovered is that, in most cases, this wasn’t terribly hard to do. I had a range of different sites to retrofit, as well. Everything from early experiments in WordPress to table-based static HTML. While the table layouts were generally the most time-consuming, I was amazed at how well I was able to convert them to CSS within just a few hours. And the CSS-based layouts were even easier to deal with.

To me, this demonstrates that HTML and CSS are quite resilient and much of what an old site has can be salvaged in these types of situations. That’s not to say everything is semantically perfect, but you can indeed squeeze some more life out of an old site.

HTML code in a text editor.

Typography Isn’t an Afterthought

At one time, the web was severely limited when it came to fonts. That may be one of the biggest evolutionary changes over the past 20 years. But I’m not sure that any amount of cool fonts could have saved me from my previous poor decisions with typography.

For instance, I was obsessed with small type. I’ve found a number of old projects where the font size was set incredibly low, and the leading forced lines to be virtually squished together. As you may have guessed, the result was content that was very difficult to read.

As for why I did this, I have a theory. I know that, at the time, small text was seen as more visually-appealing. Display technology wasn’t very good in those pre-Retina days, and fonts often looked jagged at larger sizes. Tiny text was one way to combat that effect. It was as if the look of the text was more important than what it was actually trying to say.

Since then, it’s become clear that type is meant for way more than looking pretty. If it’s not readable, it’s not accessible.

Wooden letters.

Creativity Can (Still) Solve Problems

The various hacks I used to put a site together is almost hilarious to think about now. And I know that I wasn’t alone in implementing them.

Workarounds like slicing up large images (and putting them into a complex table layout, no less), adding various code for compatibility with older versions of Internet Explorer, and all manner of vendor prefixes were like virtual duct tape. They held everything together, tenuous as it all was.

While the practice itself wasn’t necessarily great, it was done for a noble cause. The goal was to make a site work for the widest range of users possible. And that’s still true today.

And, even though the concept of “hacks” is no longer in fashion, the creative energy behind them certainly is. The big difference is that we have the tools to solve design challenges in a more appropriate way. Now, creative use of those tools can get us past just about any obstacle.

A lightbulb.

For Best Results, Clients Require Guidance

This was one of my hardest-learned lessons. As a young designer, meeting with clients was essentially like taking an order. I wrote down what they wanted and did my best to deliver.

While you can certainly get by with that strategy for a little while, it’s not so great in the long term. Web projects don’t turn out so well without a carefully-crafted plan. And it’s nearly impossible to do that when the people making the decisions don’t have the information they need.

That’s actually a big part of a professional web designer’s job, even though we don’t always talk about it. We’re the experts hired to ensure that a website is attractive, functional and accessible. But if we stay silent in those client discussions, the end result won’t be up to par. Nobody wins in that situation.

These days, I’m not afraid to offer up an honest assessment of a client’s ideas and try to help them find the best path forward. It’s usually well-received and appreciated. And the outcomes are much better, to boot. It becomes obvious as I look at more recent projects as opposed to those built when I was but a youngster.

A vintage compass.

Don’t Be Afraid to Change for the Better

For me, change has always been the monster hiding underneath my bed – ready to strike the minute I’m comfortable with a process or technology. Early on in my career, I spent an unhealthy amount of time fearing and resisting changes to how I got things done.

I was terrified of CSS layouts. The thought of using a database made me break into a cold sweat. Writing PHP? Forget about it.

But a look over my portfolio proves that my fears were unfounded. I don’t claim to be the world’s greatest anything. But I did find a way to evolve over time. Back in 1995, I started hand-writing HTML in a text editor. And, somehow, all these years later, I’ve managed to learn new skills and (for the most part) stay with the times.

Sure, change still sends a little shock to my system (I’m looking at you, JavaScript). Yet, I’m much more confident in my ability to adapt. Why? Because I’ve done it before.

Autumn leaves on the ground.

Revisit Your Rise

Love them or not, your old projects are there for a reason. Sure, maybe they don’t look or function quite as well as that fancy new thing you just released. But there are still some valuable lessons to be learned from them.

For this reason, I’d highly recommend taking a look through your archives. Not only can you gain some insight into your evolution as a designer, but you can also see how you’ve already put those lessons to good use.

In fact, you may not realize just how far you’ve come until you revisit the past.

The post What My Old Design Projects Have Taught Me appeared first on Speckyboy Design Magazine.

Apple cider vinegar won’t make you lose weight the way the diet ads promise

You may have seen a much-circulated story, allegedly posted on CNN’s website, in which a Cornell University student claims to have lost 37 pounds through a diet regimen consisting of apple cider vinegar and supplements of Garcinia cambogia, a type of tropical fruit.

If it is not immediately obvious to you, this is an internet ad for weight loss supplements, not a CNN story. The woman interviewed in the story doesn’t exist. Apple cider vinegar and Garcinia cambogia do not do what the ad claims they do, and can in fact be harmful when taken as suggested.

Everything about this ad is a lie. It lies about big things that could hurt people’s health and it lies about stupid little things like celebrity diets. It is a lie smothered in lies and served open-faced on a bed of lies. Let’s unpack this.

Claim: The story is from “CNN Nutrition”

Fact: A good way to tell where a story is from is to look at where the story is from. If I were to write, “This story you are reading on www.gov.uk represents official UK policy on phony diet ads,” you could look at the top of your browser and see that you are in fact on qz.com and I am lying. CNN’s URL is cnn.com, not independant-research.com, and that is not how “independent” is spelled.

Claim: “By Suzanne Pischner”

Fact: There is no Suzanne Pischner on LinkedIn or Twitter. Her byline appears only on other fishy-looking weight loss ads, including one purporting to be from TMZ posted under the URL trompe l’oeil tmzf.itness.co. Suzanne, if you are real and reading this, please send a notarized birth certificate to hi@qz.com.

Claim: “Amanda Haughman, a student at Cornell University, was able to drop 37lbs off her waist in 1 month without ever using a dime of her own money.”

This is not Amanda Haughman.

There is no Amanda Haughman in Cornell’s current student or alumni directories. In December, a nearly identical ad for a product called “Premiere Garcinia Cambogia” labeled a completely different woman’s photo as “Cornell student Amanda Haughman.” A lifestyle blogger pointed out that the photo was in fact of a Scottish woman named Seana Forbes, and was taken from a YouTube ad for a fitness app.

An independant-research.com story dated March 13 said Amanda was a Cornell student. In similar ads dated March 14, she went to Harvard or Stanford. A Google image search turns up ads describing the same blond woman with the too-big jean shorts as a student at UCLA, Michigan State University, the University of South Wales, and the National University of Singapore. Amanda Haughman is either a privacy-minded global scholar or—and this is just a theory—not a real person.

Claim: “Since the study, Amanda shared the TrimGenesis Garcinia and apple cider vinegar combination with her close friend, Mark, who had also been struggling with his weight.”

Yes, this is Mark, but not that Mark.

Fact: The image of the man identified as Mark was lifted from a 2015 story in the Daily Star, a UK daily tabloid, about a man named Mark Smithers. Here a pellet of truth is dropped in the rabbit hutch of lies: there is a Mark and he did lose weight. But he did not use this product and is not a close friend of Amanda, who is not real.

Claim: “We sat down with Amanda”

Fact: Amanda can’t sit. She has no lower extremities. She doesn’t exist.

Claim: “I was able to find a radio interview where [Melissa] McCarthy credited her entire weight loss to combining TrimGenesis Garcinia with apple cider vinegar.”

Right person, wrong dates.

Fact: The photo labeled “2016” is from 2015; the one labeled “2015” is from 2014. No such interview with McCarthy exists. In actual interviews, McCarthy has politely rebuffed repeated requests to talk about if or how she may have lost weight, for the same reason US speaker of the house Paul Ryan has never released his colonoscopy reports—it’s nobody’s business and it’s a kind of weird thing to ask about in the first place.

Claim: “TrimGenesis Garcinia contains the naturally occurring ingredient, hydroxycitcric acid, which boosts weight loss by blocking excess body fat production while increasing resting metabolism by more than 130%.”

This is where TrimGenesis’s claims go from absurd to potentially dangerous. Hydroxycitric acid (not “hydroxycitcric,” as above) is a type of citric acid found in many tropical plants, including Garcinia cambogia. In the world of unregulated supplements, “natural” is an often-abused term that has no bearing on how safe or effective a product is. Arsenic is naturally occurring. Mercury is naturally occurring. Nature makes a lot of stuff. Humans aren’t supposed to eat it all.

A 1998 study in the Journal of the American Medical Association found no significant difference in weight loss between participants who took Garcinia cambogia and those who took a placebo. A 2011 meta-review in the Journal of Obesity found that while there was some evidence of short-term weight loss in patients using the supplement, those that took it were also twice as likely to have bad gastrointestinal side effects. Another 2013 review of 17 studies deemed Garcinia cambogia safe for human consumption, but concluded that its effect on weight loss was unclear.

The unproven benefits of Garcinia cambogia have not stopped assorted hucksters from pushing it as a weight loss wonder drug; television personality Mehmet Oz called it “a revolutionary fat buster” on a 2012 show.

“I don’t get why you need to say this stuff ‘cause you know it’s not true,” Claire McCaskill, a Democratic senator from Missouri, said at a 2014 Senate hearing on Oz’s false claims (quoted in this actual CNN story).

“I do personally believe in the items that I talk about on my show. I passionately study them,” Oz, a trained surgeon, responded. This is an acceptable defense for an amateur Bigfoot hunter, but not a scientist.

Claim: “TrimGenesis Garcinia with apple cider vinegar has been clinically proven to…”

Fact: Several claims follow; they are all bogus. There have been zero clinical studies on the effects of apple cider vinegar combined with Garcinia cambogia.

The ad never discusses the supposed benefits of drinking the apple cider vinegar, though here “Suzanne Pischner” may be relying readers’ previous familiarity with the subject. A long-time favorite of health food advocates, apple cider vinegar is increasingly popular as a home remedy for maladies including sore throats, high cholesterol, high blood sugar, acne, and jellyfish stings.

“There is ample scientific evidence” that vinegar does in fact help control blood sugar, if taken as one tablespoon diluted in a cup of water at the start of a meal, says Carol Johnston, a professor and associate director at Arizona State University’s School of Nutrition and Health Promotion. “The evidence on weight loss is meager but there are hints of this—particularly in the rat model,” she added. “If vinegar impacts body weight, it is very subtle and not what most have in mind when they start a weight loss trial.”

The active ingredient in apple cider vinegar that helps control blood sugar (and possibly weight) is acetic acid, which is found in all vinegar. And while drinking one to two teaspoons in water as recommended by Cornell/Harvard/MSU/National University of Singapore grad Amanda Haughman probably isn’t harmful to most people, it’s worth remembering that vinegar is an acid, and drinking acid straight can be dangerous.

Ultimately, the ad serves apple cider vinegar as a folksy side dish to a weight loss supplement that could have harmful side effects. The US Food and Drug Administration says weight loss supplements, including those purporting to contain Garcinia cambogia, often contain undisclosed ingredients, including active drugs.

The danger of weight-loss related fake news is that—like their political counterparts—they make ridiculous claims that can distract from the fact that they are still lies masquerading as the truth, and could end up hurting someone.

In memory of Amanda Haughman (1995-2017), a victim of the Bowling Green Massacre.

Article source: https://qz.com/932311/apple-cider-vinegar-wont-make-you-lose-weight-the-way-the-diet-ads-promise/

PHP 7.1.29 Released

The PHP development team announces the immediate availability of PHP 7.1.29. This is a security release.All PHP 7.1 users are encouraged to upgrade to this version.For source downloads of PHP 7.1.29 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.

PHP GeoHelper API Client

Package:
PHP GeoHelper API Client
Summary:
Retrieve location lists using the Geohelper API
Groups:
Geography, PHP 5, Web services
Author:
Dmitry Mamontov
Description:
This package can retrieve location lists using the Geohelper API...

Read more at https://www.phpclasses.org/package/11184-PHP-Retrieve-location-lists-using-the-Geohelper-API.html#2019-05-02-16:03:51

PHP: Hypertext Preprocessor: PHP 7.3.5 Release Announcement

The PHP development team announces the immediate availability of PHP 7.3.5. This is a security release which also contains several bug fixes.All PHP 7.3 users are encouraged to upgrade to this version.For source downloads of PHP 7.3.5 please visit our downloads page, Windows source and binaries can ...

symfony Project Blog: Symfony on Stackoverflow

There are many ways to contribute to the Symfony community besides submitting Pull Requests to the GitHub-Repository, from reviewing issues to joining discussions on Slack. I particularly enjoy answering questions on Stack Overflow.

Most of my questions on Stack Overflow are from when I first sta...

stitcher.io: Short closures in PHP

Short closures, also called arrow functions, are a way of writing shorter functions in PHP. This notation is useful when passing closures to functions like array_map or array_filter.

This is what they look like: // A collection of Post objects $posts = [/* … */];

$ids = array_map(fn($p...

Powered by Gewgley