|
I learned vim because I was doing a lot of editing through ssh sessions. It's nothing particularly special, it's just the one I happened to learn. A lot of unix-y programs have vim-like keybinds though, or a vim-like mode. So at least now I don't have to learn those control schemes from scratch.
|
# ? Nov 14, 2015 17:33 |
|
|
# ? May 17, 2024 14:39 |
|
NihilCredo posted:I also get the impression that 3/4ths of the fancy stuff vim users brag about can usually be done just as fast with a regex ("I can type a command to replace all the text between braces!"). Learning regex is sort of a prerequisite for being good at vim, given that one of the location commands is "regex", so you can say "change everything up to the nth match of this regex" if you want. As for your example, I dunno, "ci}" and start typing is pretty fast. I think I'm pretty fluent in regex and it would take a little thought to come up with the equivalent regex, not to mention that I probably need to pull down a menu and go into a separate dialog for it in another editor, and I haven't encountered any editors other than vim/emacs (with evil-mode, natch) that let me see a live preview of the results of my selection/replacement in the text itself. When Sublime was my primary editor I frequently found myself hitting rubular and pasting a chunk of text in there to try things out. The classics aren't for everyone, to be sure, but I feel like once I had the foundation pieces (understanding vim commands as a fluent language rather than isolated key sequences was a big one) each additional thing I learned was more like a multiplier, enhancing all the things I already knew rather than just adding on. But people who just cargo cult it because they heard a lot of famous hackers use them, and then never actually learn the parts that make it rewarding, are just wasting everyone's time.
|
# ? Nov 14, 2015 19:02 |
NihilCredo posted:I also get the impression that 3/4ths of the fancy stuff vim users brag about can usually be done just as fast with a regex ("I can type a command to replace all the text between braces!"). Vim uses regexes a ton (especially for stuff like search and replace), so you are partially right in that it is equally fast to use a regex. But to my knowledge "do stuff between this set of braces" is actually impossible for most regex engines if there might be arbitrary nested braces within the braces. With vim it's usually just a few keystrokes to handle this, depending on the specific problem at hand. In any case, the real reason I think most people like vim isn't for the speed per se, but because the modal editing style matches their thought process. That alignment means vim is less disruptive to their train of thought than other editors, making it more pleasant to use.
|
|
# ? Nov 14, 2015 19:06 |
|
Dessert Rose posted:As for your example, I dunno, "ci}" and start typing is pretty fast. I think I'm pretty fluent in regex and it would take a little thought to come up with the equivalent regex, not to mention that I probably need to pull down a menu and go into a separate dialog for it in another editor, and I haven't encountered any editors other than vim/emacs (with evil-mode, natch) that let me see a live preview of the results of my selection/replacement in the text itself. When Sublime was my primary editor I frequently found myself hitting rubular and pasting a chunk of text in there to try things out. Yeah, Vim is a fantastic tool for working with text and absolutely worth the time to learn. I don't use it for programming anymore (graphical debuggers are, you know, nice) but I still keep it around for text munging.
|
# ? Nov 14, 2015 19:46 |
|
as long as you don't nest the braces, sure e:f,b
|
# ? Nov 15, 2015 02:40 |
|
fleshweasel posted:e:f,b I too sometimes forget I'm not typing in vim. But why name a file ',b' ?
|
# ? Nov 15, 2015 04:50 |
|
Some of us manage commercial Unix boxen where vi (not vim) is the only fullscreen text editor that is guaranteed to be on there.
|
# ? Nov 15, 2015 14:23 |
|
feedmegin posted:Some of us manage commercial Unix boxen where vi (not vim) is the only fullscreen text editor that is guaranteed to be on there. Thats what i learned with back in college (many moons ago) we had a Unix SysV mini for the computing department, and there were backdoors a plenty meaning that when i left the junior group took over from the senior group "hackers" and the server went down 4-7 times a day as people went in as root and types kill -9 -1. I cannot get emacs or the other editors they try to hit us with, specially on ubuntu - the first thing i do is make sure that Vi(m) is installed.
|
# ? Nov 16, 2015 08:17 |
|
I looked at my old Boolfuck interpreter that I wrote 10 years ago, and...code:
Also poo poo like code:
Boolpit, more like, cesspit. I got so mad that I rewrote the whole thing.
|
# ? Nov 16, 2015 12:37 |
|
jony neuemonic posted:Yeah, Vim is a fantastic tool for working with text and absolutely worth the time to learn. I don't use it for programming anymore (graphical debuggers are, you know, nice) but I still keep it around for text munging. Vim plugins for IDEs give you the best of both worlds.
|
# ? Nov 16, 2015 16:33 |
|
Bognar posted:Vim plugins for IDEs give you the best of both worlds. Unless the plugin is incomplete and some basic commands aren't implemented and then you fork the plugin repo and you spend all your time figuring out how it works so you can JUST TURN OFF SEARCH HIGHLIGHTING
|
# ? Nov 16, 2015 16:47 |
|
Bognar posted:Vim plugins for IDEs give you the best of both worlds. I code a lot on a netbook, so IDEs take up too much screen space.
|
# ? Nov 16, 2015 19:37 |
|
Pavlov posted:I code a lot on a netbook, so IDEs take up too much screen space. All my non job related work is done on FHD x250 (12.5") and the space taken is well worth it. (I also took some time to configure things like windows sizes, positions, to work for me) All my job related work is done on two 24" dells. sarehu posted:I looked at my old Boolfuck interpreter that I wrote 10 years ago, and... We have the exact same error (well, delete[] is called inside different function ) in production code at work. I am not allowed to fix it, because the guy who wrote it was the local template guru... Xarn fucked around with this message at 20:02 on Nov 16, 2015 |
# ? Nov 16, 2015 19:59 |
|
I used to be all about multi-monitors and for some types of work it definitely makes sense, but for straight up typing into an editor all day a single screen is a lot more comfortable to me. Especially with the way modern desktops have gotten pretty good at window management and finding what you need quickly. Microsoft is still lagging though they are getting better, and OSX's mission control is pretty drat great. So to me, having a single big screen is the way to go.. something in the 26 inch to 30 inch range. I'd love to convince my employer to get me a 4k screen but it's probably a ways off.
|
# ? Nov 16, 2015 20:14 |
|
If your employer balks at spending $500 to $1000- hopefully a tiny sliver of your yearly salary- on equipment that will make you happier and more productive it sounds like they don't have their priorities straight.
|
# ? Nov 16, 2015 21:21 |
|
I've tried and tried to not use PyDev, to use emacs like the big boys, but in the end I always come crawling back. I do love me that hot F3 action. That Ctrl-space for docs and param names.
|
# ? Nov 16, 2015 21:28 |
|
It's not the money that's the problem, it's the regulations that control purchases and certifications that devices need to make. Government loves bureaucracy! My boss has flat out stated he'd love to buy me any tiny little thing I could ask for if it weren't for the rules.
|
# ? Nov 16, 2015 21:28 |
|
xzzy posted:My boss has flat out stated he'd love to buy me any tiny little thing I could ask for if it weren't for the rules. *pfffft* hahaha oh my sweet child.
|
# ? Nov 16, 2015 21:30 |
|
I'm not sure 4K is what I want for coding. Either I'm far enough back that I need to scale up and lose the benefit, or I'm close enough that I have to turn my head.
|
# ? Nov 16, 2015 21:59 |
|
Subjunctive posted:I'm not sure 4K is what I want for coding. Either I'm far enough back that I need to scale up and lose the benefit, or I'm close enough that I have to turn my head. A 3440x1440p screen is the best for coding (although I don't have one at work )
|
# ? Nov 16, 2015 22:02 |
|
I'm currently fighting my VM & guest OS to make editing not a giant pain. The current stalemate has a giant 1" top bar and text I need a microscope for, but on the plus side each function fits on a "page"b0lt posted:A 3440x1440p screen is the best for coding (although I don't have one at work )
|
# ? Nov 16, 2015 22:15 |
|
If I could, I would take my two monitors and have them rotated 90 degrees (effectively making them 9:16). Sadly, their mount does not support this and Id rather not jury rig something.
|
# ? Nov 16, 2015 22:24 |
|
I'll take four comparatively cheap 23" 1080p screens over a single 30"-40" 4K screen, personally. I need lots of screen real estate, but I don't particularly need to have it on the same screen. Having several cheaper screens will provide the same total real estate for the same or probably less money, and will display it in a bigger size = easier on the eyes. Currently I'm using a 26" screen, a 17" laptop screen, and a 15" touchscreen. It works well enough - IDE / SQL on the main screen, email / browser on the laptop, our program on the touchscreen (it's the smallest size we support). I may end up grabbing another screen from the storage at some point, if I can be bothered to deal with the huge red tape involved*. * by which I mean "ask the warehouseman if there's any monitors I can grab that won't be needed for a few months". Small companies have generally poo poo pay, but there's some silver linings.
|
# ? Nov 16, 2015 22:28 |
|
A coding failure: a programmer I know of has three 1920x1200 monitors on his desk, each about 27" in size. It makes a really cool looking arc around his chair. Whenever I walk past? He's hunched over, banging away on his laptop. I've decided the monitors are just there to show off his awesome wallpapers.
|
# ? Nov 16, 2015 22:34 |
|
xzzy posted:A coding failure: a programmer I know of has three 1920x1200 monitors on his desk, each about 27" in size. It makes a really cool looking arc around his chair. Well, hell, if they're really awesome wallpapers then it's worth it. Anyhow, I found one of my favorite coding horror some time back while debugging a C++ codebase. I tracked down the problem to a singleton (not unexpected since that codebase had literally hundreds of them), and noticed it had virtual functions in it. And after a quick search, it turned out that there was actually another class deriving from it. I tried to figure out how that would even work, conceptually, but just couldn't. In practice, though, it didn't. The singleton object itself was held by a pointer in the base class, and depending on which version of the static "GetInstance" method (base or derived) was called first, the singleton would be instantiated with the matching type. And on subsequent calls, "Derived::GetInstance" would gleefully static_cast to the derived type because type safety is for pussies (although that obviously wasn't the main horror here). The entire thing relied on no one adding a call to "Base::GetInstance" at the wrong place in order not to blow up. I think it was used in some multithreaded code, too. To this day, I still have no idea how this could happen by accident. I think that maybe I'm the horror here, and the only reason I think this was horrid is because it was written by someone so much smarter than I am that I can't even begin to understand the reasoning behind it. Like a monkey trying to understand neurosurgery or something.
|
# ? Nov 17, 2015 01:28 |
|
YeOldeButchere posted:Well, hell, if they're really awesome wallpapers then it's worth it. That just sounds like somebody was cargo-culting inheritance and did it on the wrong thing for a bad reason.
|
# ? Nov 17, 2015 01:33 |
|
xzzy posted:I used to be all about multi-monitors and for some types of work it definitely makes sense, but for straight up typing into an editor all day a single screen is a lot more comfortable to me. Especially with the way modern desktops have gotten pretty good at window management and finding what you need quickly. Microsoft is still lagging though they are getting better, and OSX's mission control is pretty drat great. At work i started a trend, we have Dell wide screen 24" monitors, i always have one vertical to allow me to see more of the code on one page (coding standards limits us to 120 characters wide) All of a sudden nearly everyone in my vicinity is using vertical screen.....
|
# ? Nov 17, 2015 08:02 |
|
When I was in college, I was a whore that had summer job money so when there was a sale on 20" 1680x1050 FW-something-something Dell monitors, I got one. And then, I put it in vertical mode. And my roommate didn't even notice! I was so mad.
|
# ? Nov 17, 2015 08:43 |
|
sarehu posted:When I was in college, I was a whore that had summer job money so when there was a sale on 20" 1680x1050 FW-something-something Dell monitors, I got one. And then, I put it in vertical mode. And my roommate didn't even notice! I was so mad. I am pretty sure you got the same one I did - 2008FPW. They were using the same LCD elements as the Apple Cinema Display and there was some sale or other that made them fantastically cheap. I still have mine. It still works, although the color is kind of faded when you put it next to current tech, and if it hasn't had a real signal sent to it for a while it takes a while to warm up (no, seriously, it has massive screen jitter until it's been used for 20 minutes or so). I can't throw it out though because it still basically works fine. Best 400 bucks or whatever it was I spent.
|
# ? Nov 17, 2015 09:03 |
|
I have quad 24 inch monitors at work. Two vertical, two horizontal. I use one exclusively for Spotify.
|
# ? Nov 17, 2015 13:59 |
Outlook - Tickets - IDE - Testing Environment
|
|
# ? Nov 17, 2015 15:37 |
|
Not a code horror, but a code related horror. Use the local artifact cache to limit a list of artifacts to only approved ones: Not great. Have to get new versions approved: Worse. Breaking the build system because you didn't even bother to approve the default maven build / test / assemble plugins: Words cannot describe.
|
# ? Nov 17, 2015 17:28 |
|
I have 2 monitors + my laptop screen. I have one straight ahead of me in the traditional position. I just throw Outlook and a couple other "glance at a couple times an hour" type things on the laptop screen and throw any documents or other reference material on the other monitor. All the actual coding and testing happens on the primary monitor. The others exist mostly to avoid the inconvenience of having to find poo poo I need to reference underneath my active window.
|
# ? Nov 17, 2015 17:54 |
|
GrumpyDoctor posted:That just sounds like somebody was cargo-culting inheritance and did it on the wrong thing for a bad reason. I guess that's as sensible an explanation as can be. It's just that it had to pass code review at some point, so it's not just a matter of finding one person with a questionable understanding of inheritance, you need to find at least two of them. Maybe the "cult" part of cargo-cult needs to be emphasized here. I think the other reason why I was bothered by this so much is that this isn't some complex pattern that relies on subtle details to work properly. It's a loving singleton. There's some pitfalls to getting it right in C++, but conceptually it's kind of straightforward as far as design patterns go, I'd say.
|
# ? Nov 17, 2015 18:37 |
|
Someone here has apparently given up fighting to get the lovely intel garbage fire graphics these things come with to use both external monitors connected to the base station because one monitor has filled up with post-it notes. Also both external monitors are on one of those nice, fully-adjustable arm mounts, so there's a monitor and a mount turned into an expensive bulletin board.
|
# ? Nov 17, 2015 18:39 |
|
Munkeymon posted:Someone here has apparently given up fighting to get the lovely intel garbage fire graphics these things come with to use both external monitors connected to the base station because one monitor has filled up with post-it notes. Also both external monitors are on one of those nice, fully-adjustable arm mounts, so there's a monitor and a mount turned into an expensive bulletin board. Meh. Guy at work writes on his MBP screen with a sharpie for important notes.
|
# ? Nov 17, 2015 22:33 |
|
Coding horror of the day.code:
|
# ? Nov 17, 2015 22:55 |
|
Maybe the author intends to run the loop a thousand times once they perfect the DO STUFF algorithm!
|
# ? Nov 17, 2015 22:57 |
|
And if not it'll totally go away Soon(tm) when we're done with that new replacement thing. The oldest "we'll do this real soon" comment I've personally seen was a year or two ago in the PostgreSQL code base, dated early 1991.
|
# ? Nov 17, 2015 23:39 |
|
|
# ? May 17, 2024 14:39 |
|
YeOldeButchere posted:And if not it'll totally go away Soon(tm) when we're done with that new replacement thing. I've seen "we should do <thing>" comments as old as 1985 in our codebase. I wonder how many of them are actually still relevant.
|
# ? Nov 18, 2015 00:15 |