Re: [OT]: vim tabs/spaces (Re: pattern matching)
"Kenneth Miller [email protected] [ocaml_beginners]" <[email protected]> Wed, 30 Mar 2016 14:31:23 +0000 (UTC)
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
I usually don't disclose information about myself, but I tend to use my identity while supporting people on the few public forums that I'm on, and that can be used to find other information. Your question is benign, so I don't care. I got my degree from UT Dallas, and I'm extremely happy with it, and I worked incredibly hard at it. The researchers and professors down there are changing the world all the time, and it's fantastic.
Warnings and extra information are great in my opinion. No one can possibly be expected to write code that the compiler will accept the first time all the time, we're human and our reasoning and creative capabilities are faulty, but typically correct statistically, for at least the reason that being generally correct is too difficult of a task to try and tackle, even for nature. It's my opinion that we just need to get things right most of the time, and that has been an adaptive minimum requirement.
You'd be surprised, but at a theoretical level, abstraction and distance from implementation is really important. When I consume and try to instantiate the goodies from any white paper that I read, I don't want to be concerned with trying to abstract away the details of their Java implementation, so what they're doing is actually a service for their readers. You'd be surprised; it's hard to abstract yourself from implementation.
Dr. Marshall B. Rosenberg wrote that book.
Yeah, to be good at teaching requires both enthusiasm and experience. A lot of professors are concerned with wanting to solve the next great mathematical problem and challenge, which is very sexy to them. Java, probably not so much. Being patient with very young adults (basically kids in their eyes) is a test of character at times for those professors, and for those that really want you to learn it's very different. Learning to relate to the professors in an empathetic fashion allows you to get a glimpse of an entirely different view, and that goes for those you interact with at any institution you are a customer of, even if it's just going out to eat.
On Wednesday, March 30, 2016 10:16 AM, "Douglas Lewit [email protected] [ocaml_beginners]" <[email protected]> wrote:
Hey Ken,
Thanks for the encouragement. It's very helpful. If you don't mind my asking, where did you get your M.S.? Just curious. Did you like the program?
I didn't realize that Vim was a C/C++ favorite. I do almost all my Java programming in Vim. Eclipse is great too, but it has so many autocomplete features that I think it makes students kind of lazy. I mean, for example, Eclipse will warn you if you forgot to implement an abstract method in an abstract super class. It has autocomplete and then you just scroll down and pick the class method that you need, etc, etc. That's okay, but then it encourages this lazy attitude where Eclipse does it all for you. A lot of my profs have this mantra, "We don't teach Java. We teach Computer Science". I think that is so lame! I mean.... that's like a piano teacher who says, "I don't teach piano. I teach music". WHAT??? I had this really super smart Algorithms prof last summer, hard teacher but extremely generous with office hours, and I really learned a lot from him. Well, anyhow, I was kind of shocked when he said to the class.... "Hmmm.... I know ints are passed by value, but are Integers passed by reference?" I'm like.... are you serious? You teach this stuff and you really don't know that? I almost took Data Structures with this clown ( I quickly dropped and got into a different Data Structures class with someone who really knew the language ) and he created something like public class BowlingGame and then stored the file in Practice.java or something like that. Then he scratched his head and said to the class.... "Gee, I wonder why it won't compile!" I was like.... ARE YOU KIDDING ME??? The first rule of Java is: the class name and file name have to match! I really had to wonder why this guy was teaching a 300-level Java class if he didn't even know the language that well. To me the language is extremely important because that's the environment in which all the theoretical stuff really comes to life and gets tested and implemented. To me a computer scientist without a computer ( used to be called a mathematician! ) is like a musician without an instrument or a baker without a kitchen.
That's my problem with some profs. I've had great ones. I had Rachel Trana ( AMAZING PROFESSOR, one of the best ) for Discrete Analysis and Computational Biology. I can't believe she's an adjunct. She's 1000% better than most of the full-time professors in my department. I've had some others that are amazing. They love what they teach, they love to teach, and they are there to help students. Other professors are like the Grinch that stole Christmas! Mean, ill-tempered, petty.... not very charming people! I see your point Ken. I think some of them do become jaded, burned out, and let's face it.... it can be hard work, a lot of research, a lot of office hours and test preparation, and at the adjunct level the pay is horrible. ( Although most tenured profs have pretty nice salaries. )
Who wrote that book on Non-Violent Communication?
On Wed, Mar 30, 2016 at 8:46 AM, Kenneth Miller [email protected] [ocaml_beginners] <[email protected]> wrote:
Hi Doug,
I appreciate your enthusiasm, and we're here with you in the spirit of learning.
Eclipse really is the defacto standard for Java work, because it just does so much so well. Vim may force you to learn now, but after you learn maven and have 13 other libraries you depend on, you will move past vim for Java. Vim is still a great tool, but it's predominantly a C/++ programmer's favorite.
Sometimes people in academia actually just want to pursue their own interests, and other times they get a bit jaded, because their enthusiasm is so infrequently matched by their students. Think about it this way - what if you had to put up with people haggling for points every day, who hadn't actually tried, but that always seemed to step on your pride for craft and engineering? It might drive you nuts if you had to deal with everyone who just wants to get a piece of paper so they can go work somewhere and forget everything you said.
What I said might not be the most accurate, but actively exercising empathy and understanding while you're talking to your professor (or anyone for that matter) can really return value, although you should do it only because it's the good thing to do first and foremost. There's a good book I read not too long ago called Non-Violent Communication, it's really sweet and simple, but basically, if you exercise those principles when you speak to him, I bet you can get him to care.
In any case, don't worry about the eclipse problem, you're on the right path to learning. When you take your learning into your own hands and actually strive to be the best you can be, you're deriving value that other students can't and won't. After you graduate, you'll learn that what matters isn't some GPA, although that might help you out in the beginning, but what you've done and who you work with.
On Wednesday, March 30, 2016 9:31 AM, "Douglas Lewit [email protected] [ocaml_beginners]" <[email protected]> wrote:
Thanks Oliver! I'm gonna try this in my .vimrc file.
This Saturday morning I'm giving myself a break from my Java class to attend a Chicago Ruby conference where the topics include Vim versus Atom ( never heard of Atom before, but it should be interesting ) and I want to ask some questions about catching errors in user-entered input. It's also a great way to meet people, interact, make friends ( and probably make enemies too! Oh well.... ) I think that's really important. The path of the computer programmer/scientist/hacker/etc can be a lonely path at times, and I think it's very beneficial to study and learn with friends, peers, co-workers, classmates, etc, etc. I have found on MANY occasions a classmate will explain something to me much better than the professor can. Although to be fair I have encountered some really wonderful professors. I wish we had more of them. My Java prof this semester actually said on the first day of class, "I want you all to know that I don't care about you! I'm just here to make more money for my pension!" Well sure, we all want $$$$, but I can't imagine this guy's rudeness to actually announce that on the first day of class! But I guess I should give him kudos for his being extremely honest--although rather blunt and obnoxious about it. Anyhow, back to editors. So I told this guy that I'm not really into Eclipse that much. Eclipse is okay, but I think it fosters some laziness in Java programmers. I prefer Vim because then I am forced to really memorize stuff and really know what I'm doing. So I asked him, "Can I use Vim instead of Eclipse?" He said, "Not a problem. Use whichever IDE you want to!" Well.... guess what? On the midterm he actually asked some dumb question about file preferences in Eclipse!!!! Geesh!!!! I almost blew a gasket, but hey, I got a B on the midterm, so I guess I can't complain that much. But still.... why do these professors deliberately misdirect students in this way? I just don't get it. There are professors who really love to teach.... and then there are professors who want you to step on sharp nails before you get your degree. I just don't get it. Oh well.
On Wed, Mar 30, 2016 at 2:08 AM, Oliver Bandel [email protected] [ocaml_beginners] <[email protected]> wrote:
Zitat von "Douglas Lewit [email protected] [ocaml_beginners]"
<[email protected]> (Tue, 29 Mar 2016 19:28:26 -0500)
[...]
> But I must confess that I don't really use Emacs that much anymore. I've
> become more of a Vim guy. The reason is simple. I've noticed that Vim has
> way more online resources and online support than Emacs. There is online
> help for Emacs too, but.... it just seems like I need a PhD. in CS or
> Physics from MIT in order to utilize those resources. The Vim tutorials
> are a little more "down to earth" for the "average" programmer. ( I kind
> of hate that word "average", but you know what I mean. ) I've also found
> that when I write a file in Vim, it looks really weird when I open it up in
> Emacs. All the tabs and indentations are way too big! I think in my
> .vimrc file I specified a tab of 4 spaces, but when I open the file in
> Emacs I end up with one tab being equal to like 8 spaces or something like
> that. Very annoying.
[...]
This looks like you just use TAB-spaces and have changed vim's settings
in a way that you display a TAB as 4 spaces, but did not expanded the TAB
to four spaces.
So, when emacs shows TAB as eight spaces, you could change the
display-settings in emacs too.
Or if you want to automatically replace TAB by spaces, you need to use
"expandtab" in vim.
You could use (for your .vimrc-file):
set expandtab
set sw=4
set tabstop=4
Then TAB will be replaced by four spaces.
(When editing Makefile's, you need to use ":set noexpandtab" to switch
off the replacement
of TAB with spaces.)
Ciao,
Oliver
#yiv6886394025 #yiv6886394025 -- #yiv6886394025ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv6886394025 #yiv6886394025ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv6886394025 #yiv6886394025ygrp-mkp #yiv6886394025hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv6886394025 #yiv6886394025ygrp-mkp #yiv6886394025ads {margin-bottom:10px;}#yiv6886394025 #yiv6886394025ygrp-mkp .yiv6886394025ad {padding:0 0;}#yiv6886394025 #yiv6886394025ygrp-mkp .yiv6886394025ad p {margin:0;}#yiv6886394025 #yiv6886394025ygrp-mkp .yiv6886394025ad a {color:#0000ff;text-decoration:none;}#yiv6886394025 #yiv6886394025ygrp-sponsor #yiv6886394025ygrp-lc {font-family:Arial;}#yiv6886394025 #yiv6886394025ygrp-sponsor #yiv6886394025ygrp-lc #yiv6886394025hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv6886394025 #yiv6886394025ygrp-sponsor #yiv6886394025ygrp-lc .yiv6886394025ad {margin-bottom:10px;padding:0 0;}#yiv6886394025 #yiv6886394025actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv6886394025 #yiv6886394025activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv6886394025 #yiv6886394025activity span {font-weight:700;}#yiv6886394025 #yiv6886394025activity span:first-child {text-transform:uppercase;}#yiv6886394025 #yiv6886394025activity span a {color:#5085b6;text-decoration:none;}#yiv6886394025 #yiv6886394025activity span span {color:#ff7900;}#yiv6886394025 #yiv6886394025activity span .yiv6886394025underline {text-decoration:underline;}#yiv6886394025 .yiv6886394025attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv6886394025 .yiv6886394025attach div a {text-decoration:none;}#yiv6886394025 .yiv6886394025attach img {border:none;padding-right:5px;}#yiv6886394025 .yiv6886394025attach label {display:block;margin-bottom:5px;}#yiv6886394025 .yiv6886394025attach label a {text-decoration:none;}#yiv6886394025 blockquote {margin:0 0 0 4px;}#yiv6886394025 .yiv6886394025bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv6886394025 .yiv6886394025bold a {text-decoration:none;}#yiv6886394025 dd.yiv6886394025last p a {font-family:Verdana;font-weight:700;}#yiv6886394025 dd.yiv6886394025last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv6886394025 dd.yiv6886394025last p span.yiv6886394025yshortcuts {margin-right:0;}#yiv6886394025 div.yiv6886394025attach-table div div a {text-decoration:none;}#yiv6886394025 div.yiv6886394025attach-table {width:400px;}#yiv6886394025 div.yiv6886394025file-title a, #yiv6886394025 div.yiv6886394025file-title a:active, #yiv6886394025 div.yiv6886394025file-title a:hover, #yiv6886394025 div.yiv6886394025file-title a:visited {text-decoration:none;}#yiv6886394025 div.yiv6886394025photo-title a, #yiv6886394025 div.yiv6886394025photo-title a:active, #yiv6886394025 div.yiv6886394025photo-title a:hover, #yiv6886394025 div.yiv6886394025photo-title a:visited {text-decoration:none;}#yiv6886394025 div#yiv6886394025ygrp-mlmsg #yiv6886394025ygrp-msg p a span.yiv6886394025yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv6886394025 .yiv6886394025green {color:#628c2a;}#yiv6886394025 .yiv6886394025MsoNormal {margin:0 0 0 0;}#yiv6886394025 o {font-size:0;}#yiv6886394025 #yiv6886394025photos div {float:left;width:72px;}#yiv6886394025 #yiv6886394025photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv6886394025 #yiv6886394025photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv6886394025 #yiv6886394025reco-category {font-size:77%;}#yiv6886394025 #yiv6886394025reco-desc {font-size:77%;}#yiv6886394025 .yiv6886394025replbq {margin:4px;}#yiv6886394025 #yiv6886394025ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv6886394025 #yiv6886394025ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv6886394025 #yiv6886394025ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv6886394025 #yiv6886394025ygrp-mlmsg select, #yiv6886394025 input, #yiv6886394025 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv6886394025 #yiv6886394025ygrp-mlmsg pre, #yiv6886394025 code {font:115% monospace;}#yiv6886394025 #yiv6886394025ygrp-mlmsg * {line-height:1.22em;}#yiv6886394025 #yiv6886394025ygrp-mlmsg #yiv6886394025logo {padding-bottom:10px;}#yiv6886394025 #yiv6886394025ygrp-msg p a {font-family:Verdana;}#yiv6886394025 #yiv6886394025ygrp-msg p#yiv6886394025attach-count span {color:#1E66AE;font-weight:700;}#yiv6886394025 #yiv6886394025ygrp-reco #yiv6886394025reco-head {color:#ff7900;font-weight:700;}#yiv6886394025 #yiv6886394025ygrp-reco {margin-bottom:20px;padding:0px;}#yiv6886394025 #yiv6886394025ygrp-sponsor #yiv6886394025ov li a {font-size:130%;text-decoration:none;}#yiv6886394025 #yiv6886394025ygrp-sponsor #yiv6886394025ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv6886394025 #yiv6886394025ygrp-sponsor #yiv6886394025ov ul {margin:0;padding:0 0 0 8px;}#yiv6886394025 #yiv6886394025ygrp-text {font-family:Georgia;}#yiv6886394025 #yiv6886394025ygrp-text p {margin:0 0 1em 0;}#yiv6886394025 #yiv6886394025ygrp-text tt {font-size:120%;}#yiv6886394025 #yiv6886394025ygrp-vital ul li:last-child {border-right:none !important;}#yiv6886394025