IT/Software career thread: Invert binary trees for dollars.

  • Guest, it's time once again for the hotly contested and exciting FoH Asshat Tournament!



    Go here and fill out your bracket!
    Who's been the biggest Asshat in the last year? Once again, only you can decide!

Voyce

Shit Lord Supreme
<Donor>
6,962
21,820
I think it's pretty settled that you use the tab key and make your IDE convert it to 4 spaces.


Pst what's an IDE!? ISPF represent!

Actually is our resident C# / Biztalk guru still about? Khane I think?
 
  • 1Like
Reactions: 1 user

Deathwing

<Bronze Donator>
16,316
7,316
WTB console editor with fully featured GUI. Does such a thing exist? My frustration with things like vim, vi, emacs, and even nano is that things I know how to do in other editors like PyCharm and Notepad++ are not immediately(or even somewhat) obvious in console editors due to the arcane shortcuts they have to assign them.

I don't use them often enough to invest the time memorizing these shortcuts either. Except for save and quit in emacs, got that one down. Still working on vi.
 

alavaz

Trakanon Raider
2,001
713
You should be able to either VNC connect to your nix machine or run X11 over SSH and use a GUI editor. Notepadqq is the linux np++ knockoff and is pretty awesome. If you use Ubuntu it should be available via apt. You can compile it from source on any distro though. I've even compiled it on Solaris before.
 

Cad

<Bronze Donator>
24,487
45,377
WTB console editor with fully featured GUI. Does such a thing exist? My frustration with things like vim, vi, emacs, and even nano is that things I know how to do in other editors like PyCharm and Notepad++ are not immediately(or even somewhat) obvious in console editors due to the arcane shortcuts they have to assign them.

I don't use them often enough to invest the time memorizing these shortcuts either. Except for save and quit in emacs, got that one down. Still working on vi.

vi takes a while to get quick with. Once you do get quick with it, you will HATE using guis for a while because taking your hands off the keyboard slows you down so much.
 
  • 1Solidarity
Reactions: 1 user

Deathwing

<Bronze Donator>
16,316
7,316
It's more like "How do I...?". Click on GUI, search around for the command I want, notice it has a shortcut too, and after a few times of using it, try to memorize the shortcut and use that instead.
 

Cad

<Bronze Donator>
24,487
45,377
It's more like "How do I...?". Click on GUI, search around for the command I want, notice it has a shortcut too, and after a few times of using it, try to memorize the shortcut and use that instead.

Yea, and after 6 months of using vi daily, you'll be quick with the shortcuts.

Find some old dude with a neckbeard and suspenders in your office and watch him edit a file in vi.
 

Deathwing

<Bronze Donator>
16,316
7,316
Yea, and after 6 months of using vi daily, you'll be quick with the shortcuts.

Find some old dude with a neckbeard and suspenders in your office and watch him edit a file in vi.
Oh, no doubt it's definitely impressive. Maybe I should just bite the bullet and start learning one.

Someone pick my poison for me.
 

wilkxus

<Bronze Donator>
518
210
As Cad Cad says.... learn to love vi as a programmer. Can find it on almost any environment these days except Mainframe where the 3270 and ISPF still rules.

When vi and macros are too cumbersome for me hacking up a Perl reg/ex script usually works well to do more complex automations.

If you have trouble remembering the shortcuts use a Sticky Notes app to pin common stuff you need/use onto your screen for easy cut/pasting to the command line.

Perhaps consider using vi as your primary editor for a while if that is not enough, until you grasp the basics.
 

Tenks

Bronze Knight of the Realm
14,163
606
Vim is a really powerful tool and any developer should know it. However like every tool it is also bastardized by some. Sure vim CAN be a full featured IDE. But it really shouldn't be. It gets a bit of a bad rap because people can and will overuse vim so it is synonymous with old neckbeard hackers. But for editing scripts and txt files vim is the way to go.
 

Tenks

Bronze Knight of the Realm
14,163
606
I am far from a VI wizard but there are some things that I've memorized simply because I need them. I can give a short list

"/" + <word> + enter = search. Use 'n' to cycle through hits. Shift + n to go backwards a hit.
ctrl + d / ctrl + u for going down and up a document
shift + ^ = start of line / shift + $ = end of line
dd = cut current line (visual + d for cutting blocks)
p = paste
(while not in insert mode) x = delete at cursor


Those are ones I use every day. This also glosses over the absolute basics like saving/quit without save/quit with save/insert mode/visual mode.

I also suggest a good vim config. I use this one. GitHub - amix/vimrc: The ultimate Vim configuration: vimrc
 

Kiki

Log Wizard
2,224
1,786
I use VI all the time and I still don't know shortcuts. If it becomes something serious I just open SSH on the box and then connect and edit it that way. I have a VI cheatsheet that I never use sitting right here.
 

Neranja

<Bronze Donator>
2,605
4,143
If you are a beginner, especially coming from a Windows background maybe you should start with "easy mode" vim. This automatically starts when you launch vim as "evim" or with "vim -y".

The main difference to "normal mode" vim is that you start in edit mode where you can enter text right away, and have to explicitly enter "command mode" with ctrl-o. Surprinsingly, this distinction seems also the hardest thing for people new to vi to grasp, as in "the stuff I enter does not show up and the editor does weird things with my file instead."

Once you understand that usually the next lesson is "commands can be repeated by prefixing them with numbers". So if you enter "yy" you copy the current line into the thing called "yank buffer" (which is not the system copy&paste buffer), and entering "3p" pastes the content of that three times. Like that "y3y" copies three lines into the yank buffer.

Repeating the "y" for a single line (and "d" as "delete into yank buffer") seems redundant at first, but once you get to the fun parts like "y$" (yank from cursor to end of line) or "ytx" (which is "yank from cursor to first occurence of, but not including character x") the basic principles fall into place.

Everything else is learing the shortcuts, like "V}gq" (visually mark current paragraph and reformat it), but you don't have to learn everything at once.
 

alavaz

Trakanon Raider
2,001
713
It's always interesting to see what everyone does with vim. Not many people actually use it enough to learn all of the tricks, but everyone has there few things that make their life easier.

Generally me being the admin-y type, I edit a lot of configs so 'dd' (delete line), 'R' (replace characters), 'G' and '#G' (move to last line / line number) get used a lot and then of course / and %s/find/rep/g
 

Aldarion

Egg Nazi
8,815
24,055
first you advocate spaces over tabs (cause multiple invisible characters instead of a single invisible character totally makes sense)

Now vi instead of nano?

Yall just enjoy pain. Its the only explanation.