TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Where is the casual programming?

79 点作者 mohamedsa大约 13 年前

25 条评论

MichaelGG大约 13 年前
There is one statically typed language with a nice toolchain that allows interactive (REPL) programming and scripting: F#.<p>Try the steps here[1]. They're old, but still work, and work pretty well. It's fast; there's no need to create a project or solution. You can type your code all you want, use IntelliSense and all that, then select and Alt-Enter to execute it.<p>If you don't want to load VS, you can just run "fsi" for the interactive shell alone. You'll lose the full IntelliSense and colour highlighting, but you still get tab-completion. Plus, F#'s syntax is much lighter than C# or Java, so it's nicer for quick scripts.<p>Quite frankly, for any level of programming, I find having a REPL available is such a massive productivity boost. I shouldn't have to give up static type checking and a slick IDE to get it.<p><a href="http://blogs.msdn.com/b/jomo_fisher/archive/2008/08/25/f-scripts-zero-to-execute-in-ten-seconds.aspx" rel="nofollow">http://blogs.msdn.com/b/jomo_fisher/archive/2008/08/25/f-scr...</a>
评论 #3820238 未加载
评论 #3820334 未加载
zmj大约 13 年前
Casual programming happens in Excel every day.
评论 #3820304 未加载
petercooper大约 13 年前
As a direct answer to the question and based on the problems the author raises, OS X's "Automator" is just that. It's casual yet still pretty powerful automation/programming. It loads fast, it has a visual IDE of sorts, and it can do a lot of jobs you'd otherwise use shell scripts for.
评论 #3820018 未加载
vectorpush大约 13 年前
I can't think of anything more casual than a shell script. Once you grok the syntax of the shell's control structures it becomes pretty easy to rig up just about any behavior one can imagine. I suppose some might consider the command line excluded from the category of casual by default but most of those people would be surprised at how insanely simple the command line actually is.
评论 #3820291 未加载
评论 #3820679 未加载
ef4大约 13 年前
It's a red herring to bring up the static vs dynamic typing issue, because both can readily support interactive autocompletion &#38; documentation.<p>Even something as Spartan as the Javascript REPL in Chrome will do autocompletion of method names, despite being in a completely dynamically typed environment.
评论 #3820688 未加载
jisaacstone大约 13 年前
I forget everything all the time.<p>I have found a great solution for this, but it is not an IDE(!)<p>It is the bpython CLI. (I hear ipython is good too)<p>When I forget some string method's name, I just type "str." and a dialog box appears with all the options. If I am learning a new module I use "help(&#60;function&#62;)" or "&#60;function&#62;.__doc__"<p>oh yeah, and there is auto-complete. and syntax highlighting.
EdiX大约 13 年前
Where is the casual carpentry? Why can't I make my own tables and chairs? How do I know which tools to buy? Why so many different types of screw heads with no clear indication in the box as to which kind should I use? Tapered shank what? How do rivets even work?! And it's not like it's a new thing either we have had wood manufacture for millennia!<p>IMHO some things will never get past the hobbist-accessible stage.
评论 #3821684 未加载
twelvechairs大约 13 年前
I'm a little disappointed that none of the posts here actually discuss how these (pretty pertinent) issues might be solved in the future in any way different to how they are at present.<p>The issue of having to choose a combination of 1000 overlapping libraries and languages, for instance, is one that affects us all, and is actually pretty recent. Whats the best solution for the future? Surely its not just 'google them all'....<p>Languages and libraries are, after all, supposed to make the leap between the conception of a simple idea and its implementation easy. If they fail to do this something will change.
drewcrawford大约 13 年前
It's not as if Python or Ruby have set out to be deliberately difficult. They've grown difficulty because they're used to solve real problems, and real problems are hard.<p>Implied inside your question is the idea that we can, in advance, choose the right level of abstraction. That we have a library / language / set of verbs that is neither too high level (like Automator) nor too low-level (like your bash script example) to solve the problem. While I think we can improve a little bit on the set of abstractions that we have, I think a broad solution is naive.<p>As a point example, I used to be frustrated that so-called 3D engines tended to grow until they included the kitchen sink. Why do I need a menu system as part of my 3D engine? Why do I need a sound engine? Can't I just use system libraries like a sane person? etc. All I want is a set of primitives that let me render models to the screen. How hard can it be?<p>It turns out that the problem of rendering graphics to a screen quickly is so hard that it actually infects the hardness of other problems. Doing elastic collisions is a trivial thing that any first-year physics student can do. Until, that is, your game loop skips six frames because it's busy rendering graphics code, at which time you need to retroactively handle collisions that have occurred <i>in the past</i>. Now we're doing rocket science, and so your graphics library needs its own physics system, because you're not going to derive that stuff. And that, basically, is the story of every feature added to every serious game engine that exists today.<p>You see this problem everywhere you look, for example, at one point people thought POSIX and C were reasonable building blocks that everyone would use, and at another point people thought that about Java. At first, BSD sockets was the primitive, now we're starting to think about HTTP connections as the primitive, maybe we should work to make REST requests in Python not suck so damn much? But at this point SPDY looks like it might be turning into a thing, so maybe we should just build primitives for that instead? If you look at this staggering tower of abstractions you start to see things that seem crazy, like SPDY including its own flow control even though TCP already has it, because TCP has some bad assumptions that should be really be fixed at the network level, but will never be fixed there as a practical matter. I hope you followed Inception, because if not you're gonna have a bad time.<p>I'm doing a bad job of explaining this, but I had this insight first after reading an article by Kamp, the author of Varnish: <a href="https://www.varnish-cache.org/trac/wiki/ArchitectNotes" rel="nofollow">https://www.varnish-cache.org/trac/wiki/ArchitectNotes</a>. He makes the argument with a specific example that as we have moved to higher-level primitives, we've built an overly simplistic mental model of how the lower-level ones like OS and hardware work. As a result, we implement our own caching code, because we've forgotten that OSes were designed to do that for us. So in a sense we have more power because we have this nice set of high-level primitives, but in practice we've forgotten all the things that those primitives wrap, we've started to believe that they are simple because they <i>look</i> simple. And so, we muddy up our application code with all this stuff that has already been solved.<p>I doubt very much that there is any software program that people actually use that is not either undergoing a big refactor right now or has one scheduled, either to make things "simpler" (less abstraction) or "more powerful" (more abstraction). Just thumbing through the projects that I work on, I am adding features to a mental backlog for a future refactor for every single one of them. This seems to be like a fundamental problem that all software projects have, and creating a new set of primitives and saying "no seriously, that should do the trick" is at best going to yield a nice little language like Python or Ruby that somebody will post articles about on HN saying why it's so hard for casual use.
评论 #3820270 未加载
评论 #3820277 未加载
评论 #3820196 未加载
评论 #3820498 未加载
uncr3ative大约 13 年前
with ipython you do get some of that auto completion for python. It'll autocomplete the module name for you, but you do have to figure out you want that module first, so you'd need to google and realize you want shutil for dealing with files. I use it a lot when I'm interacting with new APIs or even just for writing the code as I go.<p><pre><code> In [1]: import sh sha shelve shlex shutil In [1]: import shutil In [2]: shutil. ... shutil.copy shutil.errno shutil.move In [2]: help(shutil.move) </code></pre> To do other more powerful automation kind of stuff, this is pretty nifty: <a href="http://sikuli.org/" rel="nofollow">http://sikuli.org/</a>
评论 #3820510 未加载
aidenn0大约 13 年前
Lisp people don't remember the various functions or their arguments, they use SLIME which autocompletes and allows for looking up in the hyperspec.
winkerVSbecks大约 13 年前
It seems like you literally are describing Processing. I'm not sure if you've heard of it: <a href="http://processing.org" rel="nofollow">http://processing.org</a><p>It is designed for non programmers – artists and designers, so do a lot of things you are asking for.
conductr大约 13 年前
It sounds more like you just want the machine to read your mind.<p>edit: not saying that's a bad thing, IBM says 5 years to go <a href="http://mashable.com/2011/12/19/ibm-mind-reading/" rel="nofollow">http://mashable.com/2011/12/19/ibm-mind-reading/</a>
irishcoffee大约 13 年前
Like anything else, things worth doing well take time to learn.<p>There are great tutorials out there to teach you the very basics of programming in a few hours. There are also great tutorials out there that teach you to play a basic song on the guitar in a few hours.<p>After that, its up to you. If it were easy, everyone would do it. I've been programming for close two two decades, and I still feel like I'm scratching the surface of programming. As various iterations of the saying go: The more I learn about programming, the more amazed I am that computers even boot up and function.
kylemaxwell大约 13 年前
&#62;feels too much like piecing together jigsaw puzzles where you first have to know which pieces actually exist.<p>Well... that describes programming in many ways. That's not to say that shell scripting is the perfect casual programming environment - in fact, it certainly isn't! - but that anyone dabbling in things will certainly come to feel that problem. When I hacked in BASIC thirty years ago, then moved to Pascal, and then to C, that's largely how I felt the whole time.
a_bonobo大约 13 年前
I do not understand his first reason for understanding programming AT ALL.<p>He writes: &#62;To have an aid for thinking and expressing ideas. What Steve Jobs called "A bicycle for the mind".<p>But if he can't express any ideas due to trying to be "casual", how has he reached his goal in any way?<p>English is not my first language, yet I had to get a pretty firm grip on it in order to being able to express my ideas in English: there is no "casual English-learning", you either learn it or you don't.
ckpwong大约 13 年前
The question is, do people at large even want to do casual programming?<p>Stepping back, what does "casual programming" mean anyway? Automate certain repetitive tasks? Do some complicated calculation? Write a two-player tic-tac-toe? Make a Sudoku solver?<p>For the most part, "casual programming" for people who are not into the abstraction layer have been mostly done in Excel/VBA. Most people just don't realize that <i>IS</i> a valid form of "programming" (albeit a very limited subset of it). It's like people who play Angry Birds/Farmville (or Minesweeper in the '90s) obsessively don't consider themselves as gamers, even though they might have spent more time "gaming" than most Counter Strike "gamers".<p>On the other hand, if you want to dig more into programming, tools like Lego Mindstorm or Scratch teach the concepts rather beautifully. It makes moving onto an actual general purpose programming language much easier.
lsiebert大约 13 年前
It seems like one of the big things he is talking about is good documentation which includes usable example code.<p>Bash Shell scripting would be a lot simpler to use if each man page for a program or shell function had 10 or so examples with the most common command uses which were easy to paste into an editor.<p>Course my real preference would be the inverse. Search how to do something, return code in the specified language/shell to do it. Right now that's done by Google and other search engines, though rather poorly. Also google doesn't compare and contrast implentations.<p>The faster we can find a way to implement our goal, the greater our efficiency. That is something abstraction does of course , but we should remember that documentation also serves programmers.
_rs大约 13 年前
I started programming with PHP, and I was easily able to apply all that knowledge of (rather basic) web-dev to the CLI. If I need a quick script my first instinct (besides bash) would be to fire up TextMate and write some PHP. As a beginner, whenever I needed to do something Google <i>always</i> had the right answer (e.g. "php check if string contains string"). This helped because I never felt like I was reading tons of documentation, and always gave me a quick answer. Once you use the same function a few times you generally remember it.
mvanveen大约 13 年前
My teammember's remark when I mentioned this made front page: "Still reindexing."
josyw大约 13 年前
F# 3.0?<p><a href="http://msdn.microsoft.com/en-us/library/hh156509(v=vs.110).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/hh156509(v=vs.110).a...</a>
gte910h大约 13 年前
He sounds like's he's described VBA
评论 #3820260 未加载
评论 #3820185 未加载
swaraj大约 13 年前
Try writing python with Pyscripter and see if you can't code something useful in an hr
mdn0420大约 13 年前
Writing a shell script after some trial+error+googling sounds pretty casual to me.
bfrs大约 13 年前
matlab has a lot of these features, and so did genera for lisp machines. Proprietary development stacks win when it comes to solid documentation.