Live data from Hacker News

The power of the command-line as a programming environment

pindexis.github.io

21–30 of 35 posts

Re: The power of the command-line as a programming environment

#21

I would love to see more projects embrace this method of development as a lowest-common-denominator. I'd be great to be able to download a library and build it using the least number of tools. For a Java project, this might just be javac. The project could include build descriptors for ant, maven, etc. as well as IDE config. It feels like half the time I download a Java/Maven project, there is some issue with the bui…

> It feels like half the time I download a Java/Maven project, there is some issue with the build that I have to spend time debugging. I'm not familiar with Maven, and Maven is pretty complicated, so this is a pain.

Maven actually simplifies a lot and luckily has been kind of the standard on Java for the last few years.

For simple projects, as long as you have a working jvm and mvn on the path it is just a matter of mvn build. Also IDEs, at least IntelliJ and NetBeans tends to understand pom natively.

For more complicated projects my gut feeling is they would have been even more complicated without maven.

Re: The power of the command-line as a programming environment

#22

OK, wonderful. What text editor do you use in this environment? vim? emacs? ed? Where do you run your command line? A command line can run in a dedicated terminal emulator, or it can run...inside of an IDE, or inside of emacs, or tmux. How do you do compile/edit cycles--vim quickfix? Just run the compiler in a separate window and manually move to each error? The post mentions composition, extensibility, and keyboard…

Heh. I am one of those old-school UNIX people, and this post does little for me. It's really just somebody's thoughts out loud.

It's also their first and only blog post on his blog which, now that I look at it, he calls "My random thoughts."

Hmmm. I'm wondering how this got upvoted...

Reading a little bit more about the person on their about page: "I was relatively successful,creating and managing over 10 websites on a dedicated server generating around 5000 users/day at peek time. Along the way, I’ve created a couple of softwares to promote websites, scrape data, post content, break captchas etc…"

I am wondering if this was just a hack?

Re: The power of the command-line as a programming environment

#24
post #15
post #5

Earlier quoted context omitted.

I like the idea of text-mode browsing, but I find the translation of CSS causes practical problems whether its elinks link lynx etc. For example, Hacker News nested comments are displayed as being on one level. There is a hack to fix this, but per-site hacks is not a usable way to browse the web.

> For example, Hacker News nested comments are displayed as being on one level. I think that this is because syntactically they are on the same level. Assuming I'm reading the source correctly, they're all cells in a table, at the same level, rather than being nested. So elinks et al. are correct; the site is using CSS to indicate something not in the structure.

What would be the correct way to structure something like this in pure HTML?

Re: The power of the command-line as a programming environment

#25
post #15

Earlier quoted context omitted.

> For example, Hacker News nested comments are displayed as being on one level. I think that this is because syntactically they are on the same level. Assuming I'm reading the source correctly, they're all cells in a table, at the same level, rather than being nested. So elinks et al. are correct; the site is using CSS to indicate something not in the structure.

What would be the correct way to structure something like this in pure HTML?

Ordered and unordered lists () were pretty much intended for this.

Re: The power of the command-line as a programming environment

#26

I would love to see more projects embrace this method of development as a lowest-common-denominator. I'd be great to be able to download a library and build it using the least number of tools. For a Java project, this might just be javac. The project could include build descriptors for ant, maven, etc. as well as IDE config. It feels like half the time I download a Java/Maven project, there is some issue with the bui…

> It feels like half the time I download a Java/Maven project, there is some issue with the build that I have to spend time debugging. I'm not familiar with Maven, and Maven is pretty complicated, so this is a pain. Maven actually simplifies a lot and luckily has been kind of the standard on Java for the last few years. For simple projects, as long as you have a working jvm and mvn on the path it is just a matter of…

It may be standard for Java, but I wouldn't say it's simple. I'll give you an example.

Say I want to use protobufs. There are a couple prerequisites: 1) I have to know the protobuf syntax. 2) I have to know how to compile the protobuf file into my language of choice.

If you're using maven, you also have to know which plugin to use (a simple google search), and add the 30 lines of XML to your build file. This is not such a big deal, except you're also hoping that the plugin supports all the protoc features that you may need. And what versions of protoc does the plugin work with? And is the plugin well documented?

Compare this to using make, or even using the ant task. protoc is well documented and you can access all the features you want in a standard way (command line options and arguments).

Re: The power of the command-line as a programming environment

#27

Earlier quoted context omitted.

> It feels like half the time I download a Java/Maven project, there is some issue with the build that I have to spend time debugging. I'm not familiar with Maven, and Maven is pretty complicated, so this is a pain. Maven actually simplifies a lot and luckily has been kind of the standard on Java for the last few years. For simple projects, as long as you have a working jvm and mvn on the path it is just a matter of…

It may be standard for Java, but I wouldn't say it's simple. I'll give you an example. Say I want to use protobufs. There are a couple prerequisites: 1) I have to know the protobuf syntax. 2) I have to know how to compile the protobuf file into my language of choice. If you're using maven, you also have to know which plugin to use (a simple google search), and add the 30 lines of XML to your build file. This is not s…

Aren't you oversimplifying a bit on the non-maven side?

Last I checked when I use make I still have to find and download all dependencies before I can get a working build.

Maven sorts all that.

Re: The power of the command-line as a programming environment

#28

Earlier quoted context omitted.

It may be standard for Java, but I wouldn't say it's simple. I'll give you an example. Say I want to use protobufs. There are a couple prerequisites: 1) I have to know the protobuf syntax. 2) I have to know how to compile the protobuf file into my language of choice. If you're using maven, you also have to know which plugin to use (a simple google search), and add the 30 lines of XML to your build file. This is not s…

Aren't you oversimplifying a bit on the non-maven side? Last I checked when I use make I still have to find and download all dependencies before I can get a working build. Maven sorts all that.

Fair point. But I'd say the dependency management in maven is actually more of a hassle than it's worth. For me, I understand jars in a lib directory well enough. Dependency management can become complicated pretty fast (e.g. version resolution).

Re: The power of the command-line as a programming environment

#29

Earlier quoted context omitted.

Aren't you oversimplifying a bit on the non-maven side? Last I checked when I use make I still have to find and download all dependencies before I can get a working build. Maven sorts all that.

Fair point. But I'd say the dependency management in maven is actually more of a hassle than it's worth. For me, I understand jars in a lib directory well enough. Dependency management can become complicated pretty fast (e.g. version resolution).

You still need version resolution for jars in a lib directory, whether Maven does it or you do it.

Maven just automates the process.

Re: The power of the command-line as a programming environment

#30
post #8

My IDE is full screen emacs, with one emacs window running a shell for when I just want a command line. This works great on MacOSX and on Linux. It gives me integrated debugging, code navigation (with cscope-mode), code completion, git support and more. The downside is the steep learning curve, but I climbed that years ago and haven't looked back.

I have the same configuration... the only drawback is that its very difficult to do any real work on Java with emacs...
Post reply on HN