|
Edison was a dick posted:Another data point here. I started with NetBeans and eclipse then transitioned to the command line for everything but web browsing. I suspect that Eclipse has scared so many people away from IDEs. It was poo poo when I first was introduced to it in high school, and it's poo poo now.
|
# ? Jun 4, 2013 18:47 |
|
|
# ? Jun 5, 2024 08:52 |
|
JawnV6 posted:My current IDE literally does not have options to move around in the code like vim provides by default. It's not a matter of I can't get used to it, it's that the IDE offers no support for the thing I wanted to do and I have to go without. Ctrl+]
|
# ? Jun 4, 2013 18:48 |
|
Vim's great and worth learning IMO.
|
# ? Jun 4, 2013 18:48 |
|
Oh hey editor char! I tried learning Vim for nerd cred but couldn't find anything that it can do that those ""inefficient"" mouse driven editor couldn't do better. Also: Windows style navigation and selection (Arrow keys+Modifiers+Home+End+PgUp+PgDn) > Your bespoke navigation system every single time (same for Emacs and whatever else is there). It's OK to love vim just don't claim it's superior.
|
# ? Jun 4, 2013 18:51 |
|
SciTE for life. vim is for quickie commit messages
|
# ? Jun 4, 2013 18:52 |
|
Here's something really weird. I like vim and I like the IDE I'm using most nowadays (PyCharm). I'm a loving maniac.
|
# ? Jun 4, 2013 18:56 |
|
I made a vim thread so I guess you guys can continue this derail in there or something! edit: http://forums.somethingawful.com/showthread.php?threadid=3552945
|
# ? Jun 4, 2013 18:58 |
|
JawnV6 posted:As a trivial example, in vim * will search for the current word in the same file. Ctrl+F JawnV6 posted:But vim also has %, which finds the matching brace for the one under the cursor, and VS simply doesn't have an equivalent. Ctrl+] edit: oh, I was beaten to Ctrl+]
|
# ? Jun 4, 2013 18:58 |
|
pseudorandom name posted:Ctrl+] Shinku ABOOKEN posted:Also: Windows style navigation and selection (Arrow keys+Modifiers+Home+End+PgUp+PgDn) > Your bespoke navigation system every single time (same for Emacs and whatever else is there). Shinku ABOOKEN posted:It's OK to love vim just don't claim it's superior. Zhentar posted:Ctrl+F
|
# ? Jun 4, 2013 18:59 |
|
It's okay to use the mouse and arrow keys in Vim, it's not shameful despite what other people might try to tell you. You also get many other useful things like text objects, the f/t keys for jumping to a character on the line, 'cc' for replacing the current line, 'ciw' for erasing and changing the current word, 'ci(' for erasing the contents of the current set of parens, and other such things. Vim's good at navigation, but editing and transformation are its real strong suit. It takes a bit of time to learn but if you do a lot of coding you will become proficient before very long.
|
# ? Jun 4, 2013 19:00 |
|
JawnV6 posted:And that same paragraph had a better version of what I used * for Oh, I misunderstood what you meant there. Although I can offer one even better - thanks to Productivity Power Tools, I don't have to type anything at all to get other instances of the identifier under the cursor highlighted.
|
# ? Jun 4, 2013 19:04 |
|
I ended up going with vim because any non-modal editor or IDE has keyboard shortcuts that require using 2-3 fingers each for plenty of tasks, and after a while, I ended up having severe wrist pain every week or so, which would require ice and rest for hours. I tried vim because modal editing meant I had fewer keys to hit at once for any shortcut, and the pain went away almost instantly, and never came back. An editor that doesn't support modal editing is a no-go for me, because I'm not willing to get hurt just to type code
|
# ? Jun 4, 2013 20:40 |
|
http://blog.scrt.ch/2013/06/04/mongodb-rce-by-databasespraying/quote:> db.eval('Mongo.prototype.find("a",{"b":"c"},"d","e","f","g","h")');
|
# ? Jun 4, 2013 21:09 |
|
Cocoa Crispies posted:http://blog.scrt.ch/2013/06/04/mongodb-rce-by-databasespraying/
|
# ? Jun 4, 2013 21:56 |
|
JawnV6 posted:My current IDE literally does not have options to move around in the code like vim provides by default. It's not a matter of I can't get used to it, it's that the IDE offers no support for the thing I wanted to do and I have to go without. But VS automatically highlights the matching brace, so there's no need.
|
# ? Jun 5, 2013 01:04 |
|
Ithaqua posted:But VS automatically highlights the matching brace, so there's no need. Vim and VS (and most other editors) both automatically highlight the matching brace; % moves your cursor there. Highlighting has no effect on the utility of moving there, especially given it can be used as a command quantifier.
|
# ? Jun 5, 2013 01:10 |
|
Ithaqua posted:But VS automatically highlights the matching brace, so there's no need. Which is entirely unhelpful when that matching brace is offscreen, or I want to use a regex to replace text in this function alone, or... e: it also only highlights when the cursor is 'outside' the brace
|
# ? Jun 5, 2013 01:15 |
|
Someone in irc linked this amazing piece of code.PHP code:
VVVV "We've found 53,442 code results" ephphatha fucked around with this message at 12:06 on Jun 5, 2013 |
# ? Jun 5, 2013 11:54 |
|
https://github.com/search?q=extension%3Aphp+exec+%24_GET&type=Code&ref=searchresults
|
# ? Jun 5, 2013 12:00 |
|
Ephphatha posted:Possibly the best PHP code I've ever seen.
|
# ? Jun 5, 2013 12:36 |
|
JawnV6 posted:Ugh, second time I've been corrected like this. Thanks! There's more esoteric vim hooks that I'd like, but it's not worth drilling down on that. Did you not realise that this is what text editor wars are for?
|
# ? Jun 5, 2013 13:46 |
|
Sagacity posted:I had a coworker for a while who would refuse to use a regular text editor and instead was continually loving around with vim. Whenever he wanted to ask me something he would spend minutes just mashing keys just to open the right file, trying to get a window open, trying to get syntax highlighting to work. He wanted to be a real code hacker so bad! What you're saying reminds me though, of an old co-worker who did some Emacs magic on a text file. It was kinda like you described, he was pressing key combinations that did nothing for like 10 seconds, then at the end, boom, the file was fixed as he wanted it. JawnV6 posted:My current IDE literally does not have options to move around in the code like vim provides by default. It's not a matter of I can't get used to it, it's that the IDE offers no support for the thing I wanted to do and I have to go without. If I were to post one Visual Studio horror though, it's that I simply cannot find a hotkey to bind to the "Publish Web" (one click publish) button/action on the menu bar. Argh.
|
# ? Jun 5, 2013 16:41 |
|
Pilsner posted:If I were to post one Visual Studio horror though, it's that I simply cannot find a hotkey to bind to the "Publish Web" (one click publish) button/action on the menu bar. Argh. I've had the same issue. I can't seem to find a place to bind my own hotkey to that either.
|
# ? Jun 5, 2013 17:25 |
|
Is there ever a good reason to have a return inside a macro? It seems to me all that's good for is creating leaks.
|
# ? Jun 5, 2013 18:00 |
|
zergstain posted:Is there ever a good reason to have a return inside a macro? It seems to me all that's good for is creating leaks. It depends, is the macro named RETURN_<something>?
|
# ? Jun 5, 2013 23:48 |
|
ASSERT()
|
# ? Jun 5, 2013 23:51 |
|
Jabor posted:It depends, is the macro named RETURN_<something>? ERR_CHECK(err) Expands to code:
|
# ? Jun 6, 2013 00:21 |
|
Seems a reasonable idea to me. Sometimes you just want to say "if something goes wrong I can't handle it, punt it to the caller instead", and it's good to have a common way of doing that. (I'm assuming your codebase can't deal with exceptions for whatever reason. Maybe it's straight C.) It probably needs to be documented better, maybe given a better name, and remember things like the line number and other passed-in information in case you want to debug the root cause of something. It also probably needs a way to specify "clean this poo poo up if you do decide to return", though there are ways to work around that if it's missing. E: also comparing an error code to null instead of to 0 is a bit of a horror I guess.
|
# ? Jun 6, 2013 04:02 |
|
I feel like by the time you wrote the macros to take as many things and cleanup functions as you need (I'm not sure all the compilers we use support variadic macros), then you'd be better off just checking for an error manually. And the majority of the code doesn't use this thing anyway. err isn't just an integer, it's a pointer to a struct that contains a error code and a message string, and possibly other poo poo.
|
# ? Jun 6, 2013 04:32 |
|
If err is a complex object, then having a macro allows you to extend it later on to convey other information that shouldn't necessarily be treated as a failure, without having to change everywhere its used. Though in that case it's probably better to use an IS_ERROR macro or something instead, rather than something that automatically returns if it is an error.
|
# ? Jun 6, 2013 05:08 |
|
We actually do have some macros like you describe. Mainly to check if the operation can just be retried, like an RPC call didn't go through. Most of the time an error means failure of course. But they don't have a return inside them, so you have a chance to do your free()s before the function returns.
|
# ? Jun 6, 2013 14:43 |
|
MSDN blog gives advice on password hashes: http://blogs.msdn.com/b/lixiong/archive/2011/12/25/md5-sha1-salt-and-bcrypt.aspxquote:With Bcrypt, you are always safe if you do not use simple password. However, the cost of using Bcrypt is that you need to buy more web servers to do authentication. As it is 10000 times slower, to get into the same level of performance, you need to increases the capacity of your hardware 10000 times. If you have 2 authentication servers now, you need to buy 20000 servers!
|
# ? Jun 7, 2013 01:58 |
|
Aleksei Vasiliev posted:MSDN blog gives advice on password hashes: http://blogs.msdn.com/b/lixiong/archive/2011/12/25/md5-sha1-salt-and-bcrypt.aspx I'd say I really hope someone gets that taken down, but it's from 2011 so I think that ship has sailed.
|
# ? Jun 7, 2013 02:11 |
|
Aleksei Vasiliev posted:MSDN blog gives advice on password hashes: http://blogs.msdn.com/b/lixiong/archive/2011/12/25/md5-sha1-salt-and-bcrypt.aspx If you have 2 authentication servers that run at 100% load just authenticatin' your service probably isn't running too well anyway. And Jesus Christ, "Design your hash function by yourself". That is literally the worst thing you can do except for saving plain-text passwords.
|
# ? Jun 7, 2013 10:05 |
|
Jabor posted:The problem is that every IDE seems to use their own special snowflake keyboard shortcuts, and you have to pick up the mouse every three seconds, and ultimately I prefer smooth text editing and half-assed integration over smooth integration but half-assed editing. If we're complaining about ides I just want to comment there is a special place in hell where you get kicked in the dick over and over again forever and whoever was responsible for VS' bizarre implementation of regex is going there.
|
# ? Jun 7, 2013 10:22 |
|
Wheany posted:If you have 2 authentication servers that run at 100% load just authenticatin' your service probably isn't running too well anyway. It's worse than saving plain-text passwords because you have a false sense of security.
|
# ? Jun 7, 2013 10:33 |
|
I like how 3 of his sources are wikipedia and the last one is some other random website. It kind of explains everything. Does the MSDN blog mean that he is/was a Microsoft employee, or just some random MSDN dev? Because if it's the former, that's pretty embarrassing. Because knowing the implementation of a hash function means knowing how to crack it, right? It just shows how he completely misses the "point" of security and cryptography research. This isn't a matter of just not knowing about a technology -- it's being completely unaware of the fundamentals. vvvv Um, yeah. That was my point. I guess the sarcasm didn't come across well. I was referring to his advice "3) Design your hash function by yourself. Don’t just copy and paste the common open source." facepalmolive fucked around with this message at 12:41 on Jun 7, 2013 |
# ? Jun 7, 2013 11:58 |
|
facepalmolive posted:Because knowing the implementation of a hash function means knowing how to crack it, right? I can know how SHA works without knowing how to effectively crack it.
|
# ? Jun 7, 2013 12:38 |
|
KaneTW posted:It's worse than saving plain-text passwords because you have a false sense of security. You're right, and I actually immediately invented a terrible hashing algorithm that satiesfies "being worse than plain-text": code:
|
# ? Jun 7, 2013 13:01 |
|
|
# ? Jun 5, 2024 08:52 |
|
Wheany posted:You're right, and I actually immediately invented a terrible hashing algorithm that satiesfies "being worse than plain-text": This algorithm is great if you're using flat text files to store your hashes as my profiling suggests this makes them very favourable to compression!
|
# ? Jun 7, 2013 15:03 |