java的问题_Java的问题
java的問題
“Welcome students, to your first ever day of computer science! This is going to be a fascinating year, and I cannot wait to teach you all about one of the most relevant topics in the world today. Teaching computer science is my passion, and although all of you may not go on to be computer scientists, I do hope to instill you with deeper understanding of why computer science is so powerful. I hope that wherever you end up, you find a way to use it for the better.
“歡迎您,來到您的計算機科學的第一天! 今年將是令人著迷的一年,我迫不及待地要教大家有關當今世界上最相關的主題之一。 教授計算機科學是我的激情,盡管你們所有人都可能不再繼續擔任計算機科學家,但我希望向您灌輸對計算機科學為何如此強大的深入理解。 我希望無論您最終到哪里,都可以找到一種更好地使用它的方法。
Of course, today is just the first day, and we will start slowly. You will write your first ever program in Java! The learning goals for today are directly related to the program. They are as follows:
當然,今天只是第一天,我們將慢慢開始。 您將用Java編寫您的第一個程序! 今天的學習目標與該計劃直接相關。 它們如下:
- Understand different input and output types for functions 了解功能的不同輸入和輸出類型
- Understand how to read input from the command line 了解如何從命令行讀取輸入
- Differentiate between primitive and reference types in Java 在Java中區分原始類型和引用類型
- Manipulate and work with arrays in Java 在Java中操作和使用數組
- Understand the programming paradigm known as object-oriented programming: Why do we make a function public? Why do we make it private? What is the difference between a static function and a non-static function? What is dot notation? 了解稱為面向對象編程的編程范例:為什么我們要公開一個函數? 為什么我們將其設為私有? 靜態函數和非靜態函數有什么區別? 什么是點符號?
The first lab is linked on the course website. Good luck!”
第一個實驗室鏈接在課程網站上。 祝好運!”
Our teacher above (let’s call him Mr. Bit) seems wonderful at first. He is clearly excited about the topic and cannot wait to share his love for computer science with his students. Passion, after all, is an essential component of good teaching. Mr. Bit’s excited demeanor might even take some of us back to our own first computer science classes.
我們上面的老師(我們叫他比特先生)乍一看似乎很棒。 他顯然對該主題感到興奮,迫不及待想與他的學生分享對計算機科學的熱愛。 畢竟,激情是良好教學的重要組成部分。 比特先生興奮的舉止甚至可能使我們中的一些人回到我們自己的第一門計算機科學課。
But then, things take a curious turn. Most, if not all, computer science educators would agree that the Mr. Bit’s lesson plan is a bit flawed. The learning goals intended for the first day of an introductory class — for the first exposure these students have ever had to code — are utterly ridiculous. For starters, these students likely do not even know what the command line is — how are they supposed to understand how to work with it? Additionally, arrays are a fairly involved topic, and usually don’t appear until Week 3 or 4 of an introductory class. And finally, an entire course could be structured around the minute and obscure details of object-oriented programming; stuffing it into a single day (the first day, in particular) is just foolish. It might be fun for the Mr. Bit, but that does not make it best for the students.
但是隨后,事情發生了奇怪的轉變。 大多數(如果不是全部的話)計算機科學教育家都同意Bit先生的課程計劃有點缺陷。 入門班第一天的學習目標(對于這些學生曾經編碼的首次接觸)是完全荒謬的。 對于初學者來說,這些學生可能甚至不知道命令行是什么-他們應該如何理解如何使用命令行? 此外,數組是一個相當復雜的話題,通常在入門課程的第3周或第4周才出現。 最后,整個課程可以圍繞面向對象的編程的細節進行細化和細化。 將其填充到一天(尤其是第一天)中是愚蠢的。 這對Bit先生來說可能很有趣,但這并不能使它最適合學生。
And yet, educators across the nation continue to teach this way year after year, semester after semester. How, you might ask? Well, take a hard, long look at the following:
然而,全國各地的教育工作者們每年又一個學期繼續以這種方式進行教學。 您可能會問如何? 好吧,仔細看看下面的內容:
public class Main {public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Look familiar? I thought so. The famous “Hello World” program, used since the beginning of time (or, er — computer science times) to welcome new seekers of knowledge into the field. Study it closely, and you will see that to really, deeply understand what is happening in the above program, one needs to have a solid grasp of each of the learning goals outlined above. Sure, students can be made to write the program, but what are they really learning? Aside from the temporary excitement of seeing the words “Hello, World!” printed to standard output, they will gain nothing.
看起來熟悉? 我是這么想的。 著名的“ Hello World”程序自開始(或計算機科學時代)開始就用于歡迎新的知識尋求者。 仔細研究,您會發現,要真正深入地了解上述程序中發生的事情,您需要對以上列出的每個學習目標都有扎實的了解。 當然,可以強迫學生編寫程序,但是他們真正學到了什么? 除了看到“ Hello,World!”一詞的短暫興奮之外 打印到標準輸出,它們將一無所獲。
That is the fundamental problem with Java — even the simplest program requires one to possess mastery over several programming concepts that routinely trip up even experienced coders.
這是Java的根本問題-即使是最簡單的程序,也需要一個人掌握一些編程概念,而這些編程概念通常會使經驗豐富的編碼人員感到困惑。
Don’t get me wrong. I’m not hating on Java — it is an extremely powerful language whose object-oriented structure makes it ideal for solving many problems. The problem is not inherent to the language itself — rather, it is entirely contextual. Remove Java from introductory computer science classes, and the problem ceases to exist.
不要誤會我的意思。 我并不討厭Java,它是一種功能非常強大的語言,其面向對象的結構使其非常適合解決許多問題。 問題不是語言本身固有的,而是完全與上下文相關的。 從入門的計算機科學課程中刪除Java,該問題不再存在。
Java simply has too many particularities for it to be used as an initial exposure to programming. From the very first program they write, students are implicitly encouraged to write code without truly understanding what it does — a recipe for disaster. By nature of its structure, Java teaches advanced topics such as reference pointing and object-oriented programming prematurely, before students have a solid grasp on more fundamental concepts such as variables and functions. It perpetuates a cycle of coders growing used to its unique object-oriented style and failing to appreciate other, equally valid ways to program.
Java只是具有太多的特殊性,無法用作編程的初始工具。 從他們編寫的第一個程序開始,就暗中鼓勵學生編寫代碼,而不真正了解它的作用-災難的秘訣。 根據其結構的性質,Java在學生對變量和函數等更基本的概念沒有扎實的了解之前,會過早地教授高級課程,例如引用指向和面向對象的編程。 它使編碼人員逐漸習慣于其獨特的面向對象樣式,并且無法欣賞其他同樣有效的編程方式,從而使這種情況永存。
Java is quite well-suited to certain programming tasks, but this very characteristic is what makes it a poor choice for a first language. Its intricate features and unique structure should be reserved for more experienced programmers who have already internalized the basic tenets of good programming.
Java非常適合某些編程任務,但是這種特性使它成為第一語言的不佳選擇。 它的復雜功能和獨特的結構應該保留給已經內置了良好編程基本原則的更有經驗的程序員。
In contrast to the complicated code snippet above, consider the “Hello World” program in Python (my preferred choice for an introductory language):
與上面復雜的代碼段相反,請考慮使用Python中的“ Hello World”程序(我是入門語言的首選):
print(“Hello, World!”)Pretty simple, right? It doesn’t contain any weird syntax or class declarations, and therefore avoids instilling into students any preconceived notions about the nature of programming. Students can write the program and then gently be guided into introductory topics meant to ease them into the world of computer science. Python reads similarly to English and contains minimal syntactical quirks, but it still allows students to program in powerful ways.
很簡單,對吧? 它不包含任何怪異的語法或類聲明,因此避免向學生灌輸關于編程本質的任何先入為主的概念。 學生可以編寫程序,然后輕輕地引導他們進入介紹性主題,以使他們輕松進入計算機科學領域。 Python的閱讀方式與英語相似,并且包含最少的語法怪異,但它仍然允許學生以強大的方式進行編程。
Nearly all programmers agree that a needlessly complicated approach to any programming problem is a bad one. Well, in a bit of an abstract sense, I would argue that the problem of effectively teaching computer science is certainly an important one. As an analogy, consider how humans develop natural language skills. Children are taught the specific rules of grammar only after they can already understand basic verbal communication. In the initial phases of learning, semantics is more important than syntax. When it comes to teaching programming, the same principle should apply.
幾乎所有的程序員都認為,解決任何編程問題的不必要的復雜方法是??不好的。 好吧,從某種抽象的意義上講,我認為有效地教授計算機科學的問題無疑是一個重要的問題。 作為類比,考慮人類如何發展自然語言技能。 只有在他們已經了解基本的言語交流之后,他們才會被教給孩子語法的特定規則。 在學習的初始階段, 語義比語法更重要。 在教授編程時,應遵循相同的原則。
I once had a professor who complained of his graduate student instructors:
我曾經有一位教授抱怨他的研究生導師:
“They just need to realize that teaching is about instilling important, foundational concepts into their students — not simply emphasizing topics they themselves enjoy while glossing over what students may most need.”
“他們只需要意識到教學是在向學生灌輸重要的基礎概念, 而不僅僅是在強調學生自己最需要的知識的同時強調他們自己喜歡的主題。 ”
Java may have a lot of cool features, but that doesn’t mean it focuses on what students most need. An initial programming language should underscore simplicity and ease of understanding. Said another way, students should be able to learn all about variables, functions, algorithms, for-loops, and other foundational topics without being hindered by missing semicolons and extra braces.
Java可能具有許多很酷的功能,但這并不意味著它專注于學生最需要的東西。 最初的編程語言應強調簡單性和易于理解性。 換句話說,學生應該能夠學習有關變量,函數,算法,for循環和其他基礎主題的所有知識, 而不會因缺少分號和多余的括號而受到阻礙。
And therefore, for this problem in particular, the solution is not Java.
因此,特別是對于這個問題,解決方案不是 Java。
翻譯自: https://medium.com/the-innovation/the-problem-with-java-227a6bbfbe69
java的問題
總結
以上是生活随笔為你收集整理的java的问题_Java的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android p新功能_android
- 下一篇: adas技术实现途径_未来实现100%清