2018-04-28-PHP-and-MySQL-Novince

Preface

Who Should Read This Book

Programming Has Changed

It takes 10,000 Hours to become an expert

Resist the temptation to skip ahead

The concorde fallacy

You're not learning PHP

Getting braces and semicolons in the right place is the easy part

You won't get anything done by planning



Resist the temptation to skip ahead.

This is one I reiterate time and time again for my students who miss lectures.
Progamming concepts build on top of each other. For the most part, you need to learn
the earlier concepts before you can move on to the next one. If you try to move too fast,
you'll get needlessly confused and make it more difficult for yourself.

There aren't many programming concepts that exist in isolation, so if you get stuck, it's
often a result of not fully understanding an earlier concept. Don't be afraid to go back and
give yourself a refresher on what you think you already know from before. It's usually quicker
overall than struggling and trying to press forward when you get stuck!


You're not learning PHP.

Yes, you read that right. This book is focused entirely on PHP and MySQL, but don't fall into the
trap of thinking you're learning PHP. Well, you are learning PHP, but I'm using PHP to teach you to
code.

When you learn to drive, you don't learn to drive a Ford. You learn the concepts of driving, and you
can apply them to any car you get in, even if a few of the controls are in a different place.

Concepts you'll learn here will apply to almost any other language you wish to learn in the future.
Sure, there are some differences, but the underlying concepts are the same.


Once you can program proficiently in one language, you can get to a reasonable standard in another within
a few days! So don't read this book thinking "I'm learning PHP," but instead think "I'm learning to code."



It's more important to remember the concepts than the syntax. You can always look up the correct syntax, but
understanding the underlying concepts is more difficult. Which brings me to my next point...



When you start out, you'll constantly put brackets, braces, semicolons, dots and pretty much everything else
in the wrong place. You'll forget to put in a single character and your whold program won't work.


This can be incredibly frustrating at first! But once you get the hang of it, you soon realize that getting
the syntax right is the easy part. It's easy because it's strict. It's either right or it's wrong. It works or
it doesn't.

The hard part is actually writting the logic, breaking a problem down its smallest parts so you can explain
it to the computer. The computer will quickly tell you if the syntax is wrong, but there's no way for it to 
tell you whether you've given it the right instructions to solve the problem at hand.


You won't get anything done by planning. - Karl Pikington

If you've done any reading about programming, you've probably heard that you need to spend lots of time
designing your code - that you should carefully plan tht logic of your program and how it will work before
writing a single line of code. You'll come across books and articles that teach development methodologies,
something called "requirements engineering", diagrams for visually representing code, and all sorts of tips
on how to plan your code out before you write it.

The best way to learn to code is to start writing.

The fundamental problem with this advice is that it forgets a somewhat obvious fact: to design software, you
need to know what tools are available and the problems they solve. Otherwise, any desing you come up with wiill
be meaninglessly if you don't know what tools are available.

Let's assume you know nothing about building a house. You don't know how to use a hammer, a saw, how strong
a beam needs to be to support your roof, how deep your foundations need to be, how to plumb in the bathroom,
what materials are suitable for which part of the house, etc.

You can spend as long on the desing as you like and plan things as carefully as possible, but unless you know
what your tools are capable of and their limitations, you'll end up with a design that doesn't fully utilize the tools,
or a design that just isn't possible with the tools/materials available to you. Without knowing that you need
a six-meter foundation for a three-story house, you can't design a three-story house.

TED talk called "Want to help someone? Shut up and listen", by Ernesto Strolli.

However, all that planning and designing was wasted because of something they didn't see coming.

Try solving some of the problems I set before I give you the solutions.

As your knowledge grows, you'll have firmer understanding of what tools are availab and the way problems need\
to broken up. Once you reach that level, you can start planning things out in more detail before writing your code.


Whatever you do, don't look down!

Okay, maybe you should look down.


Common web server software programs you may have heard of include Apache HTTP Server(Apache), NGINX and
Internet Information Services(IIS).

PHP is a server-side scripting language. You can think of it as a plugin for your web server that enables
it to do more than just send exact copies of the files requested by web browsers. With PHP installed, your
web server will be able to run little programs(called PHP scripts) that can do tasks like retrieve 
up-to-the-minute
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 160,026评论 4 364
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,655评论 1 296
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 109,726评论 0 244
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,204评论 0 213
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,558评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,731评论 1 222
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,944评论 2 314
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,698评论 0 203
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,438评论 1 246
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,633评论 2 247
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,125评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,444评论 3 255
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,137评论 3 238
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,103评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,888评论 0 197
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,772评论 2 276
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,669评论 2 271

推荐阅读更多精彩内容