• Post Reply Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Different requirements in academia and industry?  RSS feed

 
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See what Junilu wrote here about crap code. Now, I know that when I was doing my MSc, Elizabeth would have given me a straight fail for that sort of monolithic code, and for failing to design the classes. She used to tell us all to design things, and I think I was fortunate to be taught by somebody who knew what she was doing. I think I would probably have got 25% for handing in that sort of code. At least that is above the magic 20%; I think ≤ 19% counts as, “failure to make a serious effort at the assignment,” which might mean that a resit is not permissible .
On the one hand we see so many students taught to write procedural code with everything in a monolithic method, and everybody knows that you don't even write procedural code like that. On the other hand, we don't know whether they are being taught by people who actually know how to program OO. And there are books which show that style of programming, from people who shou‍ld know better. Even the Java™ Tutorials does it. Yes, it is convenient to use the main method to show how to write algorithm XYZ, but it isn't OO programming. And there are people who advocate procedural programming and tacking OO on top of it, which several of us regulars here know doesn't work at all well. Maybe it is because procedural code looks like the algebra I learnt at school when I was twelve and it looks easier to write.

We have had problems with the relationship between academia and industry. Are we teaching computer scientists, or are we training network managers and database administrators? There has been much difference of opinion, and about seven years ago the direction changed greatly from teaching towards training. I think things are improving; algorithms and data structures (for example) has been reinstated and changed to a “core” freshers' module from 2nd year. Yes, we shou‍ld produce people who know how to program/run a database/manage networks, but that isn't the principal rôle of a university; it is for them to understand the principles they are using. I shall be very interested to hear what happens at the mentoring day Junilu is attending today (thank you for the reminder, Junilu). I suspect that it is more useful to have knowledgeable people who can learn more things after grauation, but shall be interested to hear more.

I shall be busy most of today, so don't expect rapid replies from me.
 
author & internet detective
Posts: 39280
727
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it depends on where you go to school. In grad school, we had an assignment to code review another student's submission. One of the criteria was whether it compiled. If it doesn't compile, it shouldn't even be submitted!
 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code that actually compiles is only the first stage. It is a bit like running a marathon. The first stage in that process is getting out of bed. Getting code to compile is a stage analogous to getting out of bed, but it doesn't mean you have run 26 miles. But you can be d*mn sure that you won't run 26 miles if you don't get out of bed. Agree that somebody who can't write code that compiles deserves to fail. When I sat my driving test, one of the requirements was, “start the engine of the vehicle.” It was right at the top of the page. Essential preliminary, but it doesn't mean you know how to drive.
I think Junilu's conversations look promising.
 
Bartender
Posts: 9559
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it depends on what the goal of the assignment is.  It looks like Channing is working on basic IO and program flow control.  This may be acceptable if he is in a basic programming course.  The way it worked in my school was one took an introductory course with assignments that looked like Junilu's, a second more in-depth course (binary and text file io, sorting) then a course on data structures.  The data structures course (how to build and use stacks, queues, linked lists, etc.) was where all the people who couldn't hack design dropped out.  You can't create those structures with a "one big main method" mentality.  This was in the early '90's, so we had advanced courses in both OO and structured programming. By the time we were in our 4th year, we were expected to use a modular approach and the classes were structured so we used the same code base over several assignments, adding features and functionality as we went.
Do we know Channing's career goals?  There's many IT career paths that don't really involve programming above the scripting level.
 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for not noticing your reply earlier.

No, we don't know about people's career aspirations. Nor about how they are being taught. Nor whether there are a large majority of people out there who are being taught so well they never feel the need to log on to fora.
What you described sounds like good teaching. I know, where I write, that the data structures and algorithms module has been moved to the fresher year, so maybe that will weed people out. I am not convinced that writing your own stack is necessarily a “core” part of a programming module, but it is definitely a basic part of the data structures module.
 
Sheriff
Posts: 13454
222
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem I see exists both in industry and academia. Everyone seems to be caught up in the details of this or that technology. The bulk of crap code that I see is lacking in basics: good names, good organization, loose coupling, coherence, and abstraction. I think that's because people will spend more time teaching/reading about nitty-gritty details like how to use a Scanner, or how to parse a String, how to convert from one type to another, etc., instead of reading up on design principles, algorithms, refactoring, clean code, layered architectures, proper assignment of responsibilities, modularity, etc. The latter are often seen as "advanced" topics. The problem is that they provide much of the context that's needed to understand the nitty-gritty mechanics of computer languages and how to apply them to the problems we need to solve.

Most learners are quickly lost in the mechanical details of the language and they get trapped there when they should be learning about how to do functional decomposition, how to analyze problems and lay out solutions, and how to express the organization of that solution as program components that work together. Everybody nowadays seems to go straight to learning how to make/work with the nuts and bolts but nobody is teaching/learning about things you need to know to build a car or a rocket.

The comments that I see most people put in their code is probably the best indicator of the problem:

This is a perfect reflection of the kind of misdirected focus many programmers have: on the nitty-gritty *how* instead of *what* or ideally, *why*.

We in the software industry always talk about being "engineers" but I think anyone who has been trained as an engineer will tell you that you need to know the principles of physics, mechanics, dynamics, ergonomics, economics, electronics, thermodynamics, materials science, etc. first. That's why I keep telling people to just do three refactorings to address 90% of the issues related to crap code: Rename, Extract, and Compose Method. These are the basics, IMO. Most everything else about programming depends on the kind of thinking behind renaming (clarity of expression), extracting (organization/streamlining/reuse), and composing (abstraction/organization/clarity/streamlining).

(... to be continued, after I have breakfast with my wife, whose birthday it is today )
 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I lost marks for failure to encapsulate things or for tight coupling. As I have said several times, I was taught well. I was taught that indentation and variable names were an essential part of a program. I was taught that I shou‍ld design things before trying to implement them. So that isn't a universal problem.

There is only one sort of comment worse than that:-
int count = 3; // set count to 3
 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And happy birthday to Mrs Lacar
 
Junilu Lacar
Sheriff
Posts: 13454
222
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At HackOHI/O, I had a chance to talk to Chris Wallace, a 2014 OSU grad who works for Amazon. Seemed like a very smart young man and he said that he liked how he was taught at Ohio State. I think Chris is in the top 10% though and kids like him will figure things out no matter what. I talked to one of our interns who is also an OSU student, in her second year in the CSE program and she was genuinely frustrated about the way programming instruction is going for her and even more so when I told her my assessment of the syllabus of her current Java programming class, which my son is also taking.

I have yet to hear back from the Director of Educational Services of the College of Engineering at OSU, who promised to hook me up with someone on their faculty to start a discussion about getting industry and academia aligned. I don't expect a reply soon since it's a busy time of the year for teachers. I'll try to follow up in a couple of weeks.
 
Junilu Lacar
Sheriff
Posts: 13454
222
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a perfect example of teachers concentrating on what I think are the wrong things: https://coderanch.com/t/673254/java/Creating-game-Pig-statement#3150394

The problem is clearly one where functional decomposition can help. Yet, when I mentioned it, the student has no clue what I'm talking about. It only takes a small example to show them how it can be beneficial and the student can even see how it's so even without any formal instruction on methods and functional decomposition.

The student, however, decides to stick with what the teacher wants him to do and move ahead with his Big Ball of Mud, pain in the @$$ everything-jammed-into-main method way of solving the problem. To me, this is a disservice to the student and it's lazy on the part of the instructor.
 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Junilu Lacar wrote:. . . To me, this is a disservice to the student and it's lazy on the part of the instructor.

Being in academia myself, I think that is more than a disservice and worse than lazy.
 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That assumes that is what the instructor said, as opposed to what the student heard. That might be different. The student seems very surprised about using if and while only, but I have a language which only permits IF and WHILE, so I think there is nothing unusual about it. He may have misunderstood what he was told about main methods.
 
Junilu Lacar
Sheriff
Posts: 13454
222
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, let's assume the student didn't quite understand the constraints for writing the program. Why do most students we get in the Beginners forum seem to do things the same way, jamming everything into main? Why give a problem this big and give the explicit constraints of writing the program using only if-statements and while-loops? What is the teaching goal for giving such a problem? Is that goal appropriate for beginners? Shouldn't beginners be focusing on how to organize their thoughts, the solution, and the program code?

From high school all the way through college, this is how we were taught to solve math and science word problems:

1. Gather and organize the information you were given.

2. Identify variables and unknowns

3. Identify the principles, theorems, and laws involved.

4. Set up initial equations and solve for the unknowns through application of principles, theorems and laws.

Our solutions always had the same general form:


I see no hint of this kind of organization in most of the code we see in these forums, nor do I see it in a lot of the "professionally-written" code that has caused me to lose sleep, hair, and (once in a while) sanity. It's aggravating and discouraging to see just how many students are going through their courses still clueless and confused. Is this really what we have to look forward to joining our ranks as professionals? Certainly we can do better to give them the proper skills and tools they need to be more successful. Instead we seem to have more teachers like this poor guy's who has them using only if statements and while loops to solve a problem that would be easier and more appropriately solved in Java with a couple of proper classes and some functional decomposition. Even if you didn't use classes, the concept of functional decomposition can't be that hard to understand and apply.

The intern I talked to at HackOHI/O suggested that maybe I should teach a course or two. That's something that has certainly crossed my mind and it so happens that a "strengths assessment" I took recently at work—our management makes us do these every so often—reported that I was primarily a "Teacher" and a "Provider". I don't usually put a lot of stock in these kinds of things but I thought the results of this assessment were pretty spot on when I watched the videos that described the kind of things that a "Teacher" and "Provider" were best suited for.

 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If he really is being taught to write monolithic code, even if you look at C books from the 1980s, they didn't use monolithic code then. The monolithic code is a problem of modern teaching, where, as you imply, the teachers don't know what they are doing.
I disagree about the restriction to use only if and while. All that means is write in a structured style. As we all know, if and while are the basic and most general forms of selection and iteration, so restricting students to those constructs (as well as sequence) shou‍ld be but a minor constraint which they shou‍ld find easy to fulfil.

Maybe there isn't a conflict between academia and industry after all; academia wants people who know how to teach, but they have failed to find anybody there.
 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Junilu Lacar wrote:. . . a "strengths assessment" I took recently at work . . .

Now you come to mention it, that sort of thing is obvious from your posts here.
 
Campbell Ritchie
Marshal
Posts: 64493
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beware digression.
I get annoyed when I see teachers have been too prescriptive in their instructions. A few years ago we had an assignment here and I was told that two constructors was a requirement. To which I said, “Why? You only need one constructor. Watch,” and showed how the second constructor was unnecessary on the whiteboard. Another example here where the teacher has manadated variable names starting _ and that abomination, java.util.Date.
 
Junilu Lacar
Sheriff
Posts: 13454
222
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the risk of turning this into a rambling thread...

I just discovered a great book on Safari Books: Think Like a Programmer by Anton Spraul, No Starch Press, 2012.

The book is all about problem solving strategies and techniques. I've only gone through the first chapter but it's looking really good. Coincidentally, I ran into a buddy of mine from Aikido this past weekend and we got to talking about the same things we discuss here. We both agreed that part of the problem in how kids are taught these days was the lack of focus on problem solving techniques. People seem to be using trial and error with no systematic plan of attack. In the past week, I have told at least two forum members to stop guessing and formulate a plan. And teachers, they seem focused on the minute details of the problem, giving their students imperfect templates to fill in instead of guiding the students in formulating a plan of attack so they can figure things out themselves.

I was also watching a training video of Uncle Bob's earlier today (or yesterday now, I guess). It was part of his clean code series of videos on Safari Online and he was talking about Brooks' Law on making a project even more late by adding people. He said that although after a while, you'd expect the new people to learn and become more productive, there was just one major flaw: the new people were learning from the old people who had made the current mess in the first place. They are reading the current cruddy code and learning "how things are done here" from it. So, they start to emulate the bad practices that made the project late in the first place.

These are all related and feed into each other to create a vicious cycle.
 
Ranch Hand
Posts: 239
12
Eclipse IDE IntelliJ IDE Java Scala Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There does seem to be a difference in my experience between interview candidates coming from graduate computer science programs and those that have just done an undergrad + work experience. I distinctly remember one candidate who I interviewed who had been in CS research and getting his Ph. D. and had never been in the industry. When I had him code some things on a whiteboard, he always did this when writing if statements.



He got up to flag5 or flag6 I remember.
 
Junilu Lacar
Sheriff
Posts: 13454
222
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Scott Shipp wrote:He got up to flag5 or flag6 I remember.


You mean you let him get that far?

We would have been done on flag2.
 
Scott Shipp
Ranch Hand
Posts: 239
12
Eclipse IDE IntelliJ IDE Java Scala Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Junilu Lacar wrote:

Scott Shipp wrote:He got up to flag5 or flag6 I remember.


You mean you let him get that far?

We would have been done on flag2.



LOL. Well I tried to ignore it to see if his overall solution for the problem was still on point. But as you can imagine it was also bloated.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!