Teaching Programming to Non-Developers
Eric asks: "I'm teaching a web application development class at a local public university. The students are seniors in the business program; the course is intended to expose them to development practice (we're using PHP and MySQL) but is not intended to turn them into developers. So what would the Slashdot community recommend within the curriculum? How would you teach web development to the managers of the future, and why?"
Then the day before the assignment is due, totally change the requirements and expectations from them.
Then knock their grade down for not completing the assignment on time.
Maybe that will give them some insight to what they do to programmers when they make decisions like "Oh, this one little functionality change won't make a difference to the IT team. I'll go ahead and promise the customer it will be changed by tomorrow."
Every manager will profit from being able to make his own custom reports from company databases available to him. There are many databases in each company and the reporting abilities of current business software are very limited. Manager who can do a custom report for himself and even make it into a well generated web page for presentation to his superiors will definitely have an edge in his job.
If programs would be read like poetry, most programmers would be Vogons.
You have to use words like "incentivize" and every sentence must contain the phrase, "at the end of the day".
It's simple: I demand prosecution for torture.
How would you teach web development to the managers of the future, and why?
Set it up so that they're building an app for you. Let them just go at it. Have them draw up the specs and implement it. Then change the requirements on them at the last minute and bitch and moan at them about their product.
No, seriously - tough love 'em. It'll give them an appreciation as to how things ought to be done and why. You can tell them all about the need for good requirements in a lecture but it's going to go in one ear and out the other until it actually bites them. If you're feeling generous, do this halfway through so they get a chance to fix it.
These guys are going to be managers so you're doing them a favor - if they learn this lesson when their project/budget is on the line it's already too late (Peter Principle aside).
My best Software Engineering class involved a project to build a full groupware calendar. 4 CS students, 5 weeks. The prof acted shocked that just implementing something the scope of Groupwise or Exchange was too much to bite off for the group/time but in retrospect he knew full well what he was doing and was trying to teach us some lessons about what/where to cut and shipping on a schedule. Figures he was a visiting professor - the resident algorithms guys hated him.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Why are they in this class to begin with? Figure that out (or, assuming you know already), then make the project into something that will seem useful to them. Printing hello world, outputting today's date on a web page or anything boring and useless like that is bound to be quickly forgotten. Show them something that makes sense for them in their domain that relates to why they are there.
If they think that what they are learning will be useful, then they will remember it.
Hexy - a strategy game for iPhone/iPod Touch
I don't need my boss to pull up a chair and sling out PHP script with me, but I DO need him to make sure my goals are clear, the customer knows what they are getting, and the schedule makes sense. The better he does THAT job, the better I'll do MY job.
--This sig is in beta. Please let us know abut any errors you find.
"So what would the Slashdot community recommend within the curriculum?"
Natalie Portman, grits, and Michael's biography. If the students are Korean, replace Portman with Katie Holmes. Be sure to repeat your lecture at least 3 times a week, each time using a different lecturer.
set up a group with arbitrary channels, i.e. Person A prepares the spec but has to meet with Person B for at least an hour to get it approved, once approved, the spec goes to Person C, who gives it to Persons D and E for actual coding. However, D and E have to go to Person C at least twice with questions, and C has to meet separately with A and B to answer these questions. Then C has to meet with D and E again to address the questions. (All of these meetings should be at least 30 mins.) Finally, D and E complete the project for review, at which time the teacher changes a requirement. And on...
Business Majors should love this....
You don't have time. Plus, if they wind up being managers, they don't need to know about PHP and MySQL's specifics. You're only going to have about enough time to teach them how to make a completely watered-down application, which will be totally useless to them, and won't help them understand what real developers are doing.
Instead, show them what the LAMP model is all about. Bring up issues like:
- LAMP vs. Oracle
- Open vs. Proprietary
- MySQL vs. PostgreSQL
- read-heavy applications vs. transaction-heavy applications
- Dealing with high demand (/. effect). You might want to mention:
- Smart caching with Squid/mod_proxy
- Database optimization
- Making non-dynamic pages static
- Using a smaller http server to serve static content (such as thttpd or a barebones Apache)
- Moving from PHP to mod_perl for high-traffic applications
- One big server vs. two or three (or more) very cheap servers
- Time vs. Money:
- In-house vs. Outside development
- Creating a new system vs. Adapting existing system (which may cost)
- etc
Try to get some opinions and discussions happening -- these high-level topics are more useful to them than how to set up an over-simplified database-driven website that won't scale.-ben
I suppose such a course is OK but more often they infuriate me. Someone teaches a "business" class on web design. They hack together a bunch of pages in Word or FrontPage and then emerge as the sorts of bosses who wonder why they are paying so much for IT. Some people come out of these classes thinking "I can use the phone so I can probably run the phone system."
Constantly remind them of the myriad issues that you aren't covering like security, content management, error checking, reliability and failover techniques, good database design (OK, hard to do in a db with terrible bounds-checking, error reporting and such but you can try).
It would probably be very instructive to examine their apps and then show where they fail: "Look, I just retrieved all your customers phone numbers, bought lots of stuff for free and then purged your database."
You might also show your solution to the problem. It will probably be 10 times longer than theirs but will show the error-checking, user-friendly design and security features that they left out.
Finally, remind them that even thought they are doing very simplistic stuff it still requires someone to configure and maintain the network, servers and software.
On the plus side you are using open-source. The big impression you can leave the biz-school types is the cost comparison between Linux/BSD/PHP/Apache/PostgreSQL/etc. and the proprietary alternatives.
~~~~~~~
"You are not remembered for doing what is expected of you." - Atul Chitnis
I taught a one-semester PHP and MySQL basics course a while back and you may find the materials there helpful. If I had to distill the most important parts down for non-coders, I'd emphasize confidentiality, integrity, and availability as the most important properties of an information system.
http://tinyurl.com/4ny52
In my experience, managers have a very hard time qualifying and quantifying the development process. I suspect your students will want/need the following:
1) basic understanding of computer/os architecture
2) basic understanding of programming logic
3) basic understanding of storage (eg: filesystems, sql)
4) enough skill to be able to solve one-off problems that *they* may have (as opposed to developing a system for someone else)
5) understanding of differing development methodologies.
6) security concerns and where they come into play
7) estimating time and scale of a project
The main concern, I think, is to get them to understand how to evaluate the scope of a problem and the types of resources that are required to solve it. I know a lot of managers that, given an IT requirement, would have to rely entirely on the IT staff to estimate the time and resources required to complete the task. They would have no way estimating it on their own nor could they predict or foresee problem areas that may lead to delays or product failures.
If you can make them think like programmers/designers or even just appreciate how developers think that is probably enough. It might even be instructive to take apart a large project (don't have them write it, have them dissect it and understand the basic pieces) so that they can get a feel for the types of challenges that developers face. Lets face facts, there is no point in teaching SQL or PHP to someone who has no immediate need for it. They won't remember it and the arcane details they pick-up won't actually help them when they attain the types of positions they truly want. If you can distill into them even some comprehension of the real work of developers you stand to help both developers and managers.
Now is your chance. Make those 'managers-of-the-future' suffer for all the pain they will cause us. Force them to stay awake for 72 hours finding obscure bugs in code older than themselves. Get a megaphone and yell at them non-stop about upcoming deadlines. Have them chew raw coffee beans before giving them a stack of yesterdays pizza's for dinner.
No, I don't work at EA. Why do you ask?
*twitches*
If you want to have managers who can program, hire a programmer. And don't, as so many others have suggested, give them a lesson in how fucked up and terrible it is on us poor programmers (ex: make them write something and then change the scope on the last day, ask them to do something in an impossible amount of time, ...)
Remember that concept of abused kids growing up to be abusers? I think it applies here.
Teach them about how interfaces and implementation hiding work, teach them about how programmers divide up work, and how modules can depend on each-other, and about unit testing. Teach them how difficult it is to estimate (time, cost) on a software project.
Teach them about programmer _culture_, what programmers value and what they disdain.
Teach them to play with scripting, not programming -- teach them how to build bigger functions out of smaller ones.
Teach them how to recognize a great programmer, and then trust him/her to deal with the programming side of things.
Step 1. Get out checkbook.
Step 2. Hire decent developers
Step 3. Make the business requirements clear, valid, non-conflicting, and technically viable
Step 4. Give the developers a good development environment (hardware, software, and surroundings)
Step 5. Run interference, keep the end users from hassling your developers
Step 6. ???
Step 7. Profit!
Glonoinha the MebiByte Slayer
Walk in one day with your head down and say..
"Well the paradigm shifted again, brick and morter are back and people want face to face contact, So today we will be going out in the parking lot and learning correct steps for brick vaneer wall construction"
__________ Leave me alone I'm compiling a RPG II program on my S/36...Thanks to metamucil I'm a Regular Meta Moderator
Spend a day teaching them to itemize, in excrutiating detail, a sequence of events like "waking up and getting ready for work". Part of the problem facing people first learning to program is learning to think at a detail level.
This also lets you highlight that the sequence of events is important too. Getting dressed before getting in the shower is nonsensical, and that puts sequential operations in perspective.
I tutored computer programming in college, and had some folks bring in their assignments. The code looked like it had been copied/pasted (manually, this was the late '70s) in random order. Close file; read file; open file; process file. They couldn't understand that the sequence of instructions made a difference.
Can You Say Linux? I Knew That You Could.
I have had _way_ too many bosses, at all levels of the chain of command who thought they knew how to build software. One was the president of the government systems division, who thought he was a software guy because he had hung tapes for a mainframe when he was in the air force 30 years before. Lots of EEs think they know software because they wrote one-off programs to solve homework assignments. I once ran into a PhD (5 degrees actually) who was leaving the academy to run a 400 person project. Biggest thing he had ever done, 5 people for 2 semesters.
If one of these b-students ever gets to be a boss of mine, and acts like they know anything about the industrial software process, I'm going to find you.
And hurt you.
Trust me, humanity will be better for it.
Bad User. No biscuit!
1) Teach them to learn the local employment laws so they know how many weeks they have to work to be eligible for unemployment benefits (only works in civilized countries)
2) Teach them how the local unemployment system works, do they need to call in, fill in a card, what?
3) Teach them about the cult, err universities, that will suck the money right out of their pockets with a vacuum cleaner, in exchange for reading 150$ textbooks with a disgruntled professor.
4) Teach them that about 90% of what they paid to learn in the cult will be a) useless, b) forgotten in two years as all you can get are entry-level jobs so when you *do* get a good job, you have to learn over again at your own expense anyways.
5) Teach them that working in a field that involves cheap commodities like computers and software and is saturated with cults and people, will mean they have to compete every day for the rest of their lives to fight for crumbs.
6) Teach them to interpret HR "requirements" like "5 years experience for 1 year old software": it means HR lives on Mercury, where the year is 88 Earth days.
7) Teach them how to make a CV that's full of lies that can't be contradicted (because everyone else does, because of #6 and #5).
8) Teach them how to suck up in interviews, and how to handle the pseudo-scientific clap-trap like graphology and personality tests that pervade the HR field.
9) Teach them to leave computers at home and get a real job, like starting their own business.
Lots of managers don't value well written code. Get it done and get it done fast is the rule they enforce. Maybe a segment where you give them two different scripts, one with traditional spaghetti code/long functions/poor naming, etc. and one with well written and documented code. Then ask them to fix certain bugs in the scripts or add certain features.
Saying well written code is valuable is one thing, but since you are actually teaching PHP and MySQL you have the ability to show it. Were you doing a more capable language like Java/JSP or ASP.NET I'd say also show them how valuable separating things into designed layers and concerns is in software engineering, but PHP isn't very capable in that area and you probably don't have time to teach OOP and UML and whatnot anyway.
Teaching a manager programming gives the manager a false sense of competence. He may develop the idea that he actually knows what all this programming business is about, and it'll make him an insufferable pain in the ass to all of his developers, who will curse your name in several languages for decades. Don't do it! Think of it as a "professional courtesy" issue and don't curse your comrades by creating such a monster.
:)
INSTEAD, do THIS:
Arrange the course around a 50,000 foot view of the actual development process. Show the managers what programmers actually have to put up with, what problems they have to endure, what sorts of things go wrong in their daily lives that gum up the works and cause projects to fail. Show the managers good project management practices. Instill a sense in them that all schedules are works of fiction until their projects are complete (forecasting is a myth!). Make sure they understand that in software development, anything that can go wrong will, and that it's not necessarily the programmer's fault. Show them what happens when a user changes everything right in the middle of a project, so that the manager will have a proper fear of such catastrophes. Teach them that hiring permanant staff results in the retention of institutional knowledge about the applications in use, and that outsourcing (even to local consultants) ensures that NO institutional knowledge will ever be developed or retained. Teach them HOW to hire consultants if they do -- how to develop their bullshit detectors and know when they're being lied to, for instance.
In other words, don't try to make a manager a programmer (it can't be done). Instead, try to make the manager into the kind of manager YOU would want to work for. Teach them how to manage smart people, and how to treat them well, so that they're respected and followed rather than defied, hated, and surreptitiously mocked as "The PHB".
Then, the manager's eventual staff will bless you again and again. All that good karma's gotta boomerang back and whack you SOONER or later.
Farewell! It's been a fine buncha years!
Here is a very realistic way to teach this class.
Assume the class is 10 weeks
Week 1: Design a web page that pulls data from the database and formats it. By the end of the week it not only needs to work, but you should have documented the time it took to do each task and make sure you comment your code.
Week 2: Add a new feature. Make this feature vague. Again be sure to document your code and keep track of your time.
Week 3: Act upset that no one got the feature right. Add a new feature, fix the old feature, and have everyone trade ownership of the code. Hence everyone is now working on code they did not write. (I hope everyone did a good job at documeting their code) Be sure to also keep track of your time.
Week 4: Now present a Gantt Chart of schedules based on everyone's tracking of time. Now add another new feature, did everyone fix the old feature? Trade code again, be sure to keep track of your time, document code and make sure you hit your milestones as per the Gannt chart or this will affect your grade.
Week 5: Now that everyone is pissed off. Ask the class what they have learned in business classes that could make this process better? Then take that information and what you hope to teach about good documentation and design and start all over again. This time I am sure everyone will be listening.
Week 6-10: Still trade code, document, and keep schedules. But this time I think everyone will see the wisdom in what you are teaching.
The point it seems everyone is making is don't so much teach them how to code, as much as show them how to manage someone who codes by placing them in the programmer's position.
We have an architect working for our small web company and he's been picking up bits and pieces of the coding and network management, but sometimes I feel that he doesn't quite get the overall concepts. What would the best approach to getting him into a programming mindset? Obviously we don't want to force him into something he doesn't want to do, but we really like his work ethic and hope to be able to use him for some more areas like programming and networking. Any ideas?
THIS SPACE FOR RENT
I would try higher level topics in the web programming arena since the target audiance is management who tend not to be technical. Maybe show them how a front end web interface passes data to specific tables/fields in your MySQL tables so they get a feel for the pain you endure when challenged with designing and supporting such an interface.
-Mattman
http://OneBillion.blogspot.com
If they're attending a "local public university" and their "professor" is asking Slashdot to develop his curriculum, then these students are clearly not the "mangers of the future."
Skip the basic programming. Teach them how to write good requirements documents. Teach them that small changes (in their minds) mean big changes in code. Ask them what effect the change in the requirement that "all users will be inside the company" (and thus inside the Authentication/Authorization system / directory) to "some users may be outside the company" (suddenly need a way to get these users into the system and to manage their accounts and access).
Teach them to write really good Use Case documents. To really think through the scenarios for their programming project.
Have a set of programmers - who are really good - look at their requirements and use case documents and tell the Managers what they think they are building based on their documents.
They are managers. They need to be able to effectively communicate directions and needs to programmers. So teach them to communicate and document.
Or, teach them to hire good I.T. Architects to do it for them.
The students are seniors in the business program; the course is intended to expose them to development practice
Your goals are too high given the context of the course. If you were trying to teach them html, css, basic programming, php, xor sql, I could understand that. I'm not sure any of these subjects have a great value proposition for a business student (maybe sql), but individually, on their own, they sound potentially achievable. A business student could learn sql and some database basics in a quarter. However, there's no way to accurately expose these people to development practice in the context of web development given that they probably know next to nothing about the above topics. The only way I can think of to accomplish what you want would be to embed your students with professional software development teams. They wouldn't have a clue about the technical details, but they would be immersed in a group of people who did and were presumably organized enough for actual development process characteristics to be witnessed. Teams of Computer Science students really do not count.
Have you considered teaching them to program a system they already understand? Everybody knows how to use a word processor or a spreadsheet, and these programs usually come with scripting engines. Hacking in a new feature or two to Open Office is a more accessible homework assignment than writing a database-driven web application!
Then the END TABLE model.
Then the CREDENZA model.
Etc.
Also things like the NUMBER 2 PENCIL model, the YELLOW LEGAL PAD model, and so forth.
You can find models for all of these items, and many other exciting items, at various 3D game mod sites.
On a more serious note, for those who don't know, "LAMP model" means "Lick-spittle Ass-kissing MBA Prat model".
Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
I won't be able to do justice to all the insightful and interesting comments above, but let me at least thank everyone for participating.
What was particularly interesting were the posts with the perspective (reflecting my experience) that while you can't really teach the full coding aspect (most students coming in weren't even familiar with HTML) there is certainly value to be had in understanding programming methodology. But there's also value to be had in teaching the managerial perspective.
So what to do with only a limited amount of class time?
I actually did have the class do a large-scale simulated project last term. While the project itself didn't wrap at the end, the students have already said that they have a much greater appreciation for requirements documentation, testing processes, active management of lines of communication, and other less obvious aspects of development.
But many did express a desire to learn more code, which is problematic given that you can't easily go from HTML 101 to PHP/MySQL in a few weeks. And I chose PHP/MySQL in part because that's what I'm most familiar with, but also because the school is an MS shop and they haven't had any experience with open source. Given those parameters, we never even touched on some of the excellent suggestions made by others re: availability, failover, scalability, 'real' OOP, anything more than basic security...
I really liked the idea of hooking up the students with a CS class. I also am gravitating towards the less-code approach, though the students have already said that they wanted more code and less replication of what they had experienced in other business-oriented courses.
And as a personal note to those questioning the course itself: I'm adjunct, defined as "s/he who gets paid a token sum without benefits to teach a predefined course in an established program." It hath been determined that the business students will learn web application programming, therefore they shalt learn web application programming, and that's the gig.
Anyway, so here's where I'm leaning. Structure the course so that 30 managers (the students) are managing one developer (me). Each lecture is wrapped around understanding a specific aspect of the development process. Their assignments are built around learning enough tech to understand what is going on, being able to demonstrate an understanding of the complexities of the process, and the how code and business practices impact one another.
Again, thanks everyone for participating. Any more thoughts?
http://eXtremeProgramming.org/rules.html
& let them go from there to topics of interest
My boss at the time was the director of business development, a smart guy who could handle Excel macros and that kind of thing. He was good because he understood things from the lowest levels to the highest, and, thanks to the class, was the only executive in the company outside of R&D who actually knew what had to be typed to get an application to work.
While some posters seem to think it's dangerous to let business students experience success at programming, I think your students will have a better sense of accomplishment making limited changes to existing programs and scripts. Seeing things in context will give them a better sense of scale than the tiny demo-level things they could write themselves from scratch.
One warning, and something that has affected how I write code since then: every inconsistency in capitalization, indentation, variable and function naming, file locations, etc. will confuse somebody sooner or later. I started with programs from a variety of sources and had to clean them all up after a few runs of the course because students have a hard time knowing what's important and what can be ignored. (Besides C, we had a language for specifying what words could be recognized, and so even the experienced programmers had some new syntax to deal with.)
How often do managers insist they know better? It really gets me down. If you hire a mechanic to work on your combine harvester and he says he needs a three eighths Gripley, then this means he sodding needs a three eighths Gripley, not some new tool you've just plucked out from where the sun don't shine. Trust your experts to know what they're talking about, don't try to do their jobs for them, and don't try to micromanage them.
Every manager will profit from being able to make his own custom reports from company databases available to him. There are many databases in each company and the reporting abilities of current business software are very limited. Manager who can do a custom report for himself and even make it into a well generated web page for presentation to his superiors will definitely have an edge in his job.
Where in this galaxy is there a "manager" who is capable of writing a "custom report for himself"?
I deal with people who have Bachelor's, Master's, MD's, and PhD's, and they can't even do basic stuff like point and click. Hell, I've dealt with "computer" guys [sporting Bachelor's and Master's in "computer" fields, like math, EE, etc.] who are utterly clueless.
If you're with an outfit that has managers who are smart [and competent] enough to write their own "custom reports", then I'd say: Go very, very long on whatever stock options they've granted you.
Step 3. Make the business requirements clear, valid, non-conflicting, and technically viable
My experience has been that this step always gets done in reverse: The programmer assesses the situation, decides what the "business requirements" are, and then, when he's finished creating the solution, that solution becomes the "business requirement", or even the "business model" itself.
I.e. the programmer is the only one on the team with an IQ sufficient to imagine and then create a business structure; the management team exists solely for the purpose of enforcing [on the "employees"] the structure created by the programmer.
Step 4. Give the developers a good development environment (hardware, software, and surroundings)
This is really key: Don't go telling people that you're embarking on some big new project that's got all these great funding guarantees from the suits who live higher up the food chain, and then try to nickel and dime them to death on the things they need to get the job done:
I mean, if the money isn't there, then don't undertake the fsck-ing project in the first place.And sure as hell don't go jet-setting all over the damned globe to your precious "conferences" while your technical staff are being denied the hardware they need to get the damned job done.
Don't treat them differently because they aren't going to be full time programmers. Just teach them to program.
(The history courses I took weren't "history lite" because the instructors new I wasn't going to be a full time historian.)
More importantly, don't teach them some RAD system. Teach them how a large scale/scalable project is developed. Teach them when RAD is not applicable & why.
If you start teaching them how to write PHP code then teach them how to write secure code from day one! Warn them of the dangers of Cross Site Scripting (XSS) and MySQL injection etc. See here for more security related issues.
Teach them to speak Hindi.
There are 2 kinds of people in this world. Those that can keep their train of thought,
Although the fact that I work for Oracle can possibly have something to do with that...
Cheater.
History gets tailored thru its subject matter. I bet you attended a lot more "Overview of the History of the Euro-world" than you did "Social History of the Song Era Chinese Peasant"-type courses. And in thoses courses where you *did* attend, i guarantee you got off with easier grades on lighter theses than did the hardcore history majors.
Can't tell the difference between a joke and a troll.
shoot them all, i hate managers