4 ms·
> Before you learn to code, think about what you want to code This is and always has been my problem. I like to look at what other people do, and I like coding
by rmk2 13y ago
> Before you learn to code, think about what you want to code
This is and always has been my problem. I like to look at what other people do, and I like coding in theory. But the little I need for myself isn't enough to keep pushing myself. I don't work anywhere near programming, and I don't particularly want to, either. Because of that, though, I haven't progressed very far into SICP, my finished Scheme programs can be counted on one hand, and most of my shell scripts are simple <1h (including looking things up) hack jobs.
I only really script for personal use, and my personal usage patterns are either not terribly demanding or too complex for me to satisfy.
- a3n 13y agoTry automating some of your work. Pick one simple thing that you do a lot, and write a small script or program to automate it: getting a handful of files from somewhere; putting a handful of files somewhere; opening one or a handful of files; creating the skeleton of a file that you will later flesh out. I'm guessing you probably work in Windows because most people do at work; their shells are either too simplistic and awkward (cmd) or nuclear-capable (psh). Install cygwin and use the bash shell. Or do everything in Scheme/Racket and don't worry about a shell. Automate something today, something almost too simple to automate. Repeat.
- rmk2 13y agoopenSUSE & zsh all the way! ;) In all seriousness, though, my setup is a wee bit unusual for somebody who isn't a programmer, since I work exclusively in emacs via LaTeX & org-mode, stuffing all of it into git, on a openSUSE system, zsh as my standard shell, i3 as my window manager etc. The thing is, I do have a script for example to push the current git project to various remote repositories or to create a new empty remote repository on those servers, set it up locally etc. But there are few other things that need to be scripted. I'm sure some of my things violate all kinds of sensible programming standards, but they do work (e.g. looping through shell arguments and then using case "$1" instead of using getopts, because it only allows long arguments in a hackish way). The problem, essentially, is that of the plateau. If I wanted to do something that pushes things further, I'd need a real project, not the odd, occasional shell script. But for that, I lack the motivation, since, after all, it's not really what I should be doing. It's a bit of a circular problem. edit: My "job" is studying literature.
- NAFV_P 13y ago> edit: My "job" is studying literature. I thought someone in your position might use regex fairly frequently.
- rmk2 13y agoMh, I don't really. There are few things that need to be changed all at once. The only recent time I needed regex on a wider scale was when I botched org-mode radio targets after a recent syntax change, which was a simple case of replacing >> with >>> and << with <<< respectively, as well as extracting some text from within square parenteses and put it on its own instead. But 1 to 2 lines of sed -i are not thaaat challenging! ;)
- PeterisP 13y agoThat poster probably meant things such as quantitative text analyis, comparing language patterns used in literature, etc - which is mostly a question of interpretation, but requires some skills in scripting for the initial data gathering.