Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 3 4 [5] 6 7  All

Author Topic: On the Job: f.ds edition  (Read 51628 times)

0 Members and 1 Guest are viewing this topic.

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2221
    • View Profile
Re: On the Job: f.ds edition
« Reply #100 on: April 20, 2015, 07:13:34 pm »
0

Although, I'm enough of a pervert that I would chuckle at "get a room."
Logged
A man has no signature

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7866
    • View Profile
Re: On the Job: f.ds edition
« Reply #101 on: April 20, 2015, 07:29:44 pm »
+5

Although, I'm enough of a pervert that I would chuckle at "get a room."

After six hours of continually editing and reediting his simple email to be free from all innuendo, Theory finally cracks and sends, "HEY EVERYBODY LET'S GO SEX" to all employees.
Logged

theory

  • Administrator
  • *****
  • Offline Offline
  • Posts: 3603
  • Respect: +6125
    • View Profile
    • Dominion Strategy
Re: On the Job: f.ds edition
« Reply #102 on: April 21, 2015, 09:49:32 am »
+1

Although, I'm enough of a pervert that I would chuckle at "get a room."

After six hours of continually editing and reediting his simple email to be free from all innuendo, Theory finally cracks and sends, "HEY EVERYBODY LET'S GO SEX" to all employees.

Your typical "farewell email" is so boring!  I like this approach better.
Logged

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2221
    • View Profile
Re: On the Job: f.ds edition
« Reply #103 on: May 06, 2015, 01:45:13 pm »
+1

I have someone with random apostrophes. She uses them for plurals, and I swear I might be remembering her just inserting them in other places too.

But random commas really bug me, because they change how I read the statement. I tend to ignore errant apostrophes; my brain glosses over them. But I do pause when reading a comma, and I have to start over.

Things like, "I would recommend, Bob." Since my name isn't Bob, I know she's not addressing me by name. She's recommending Bob, but I stop reading as soon as my brain picks up on the problem.

Of course, now I opened myself up to several messages with punctuation misuses, but that will not deter my rant.
Logged
A man has no signature

enfynet

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1691
  • Respect: +1162
    • View Profile
    • JD's Custom Clubs
Re: On the Job: f.ds edition
« Reply #104 on: May 06, 2015, 10:53:40 pm »
+4

I feel I should call this to, correct you or point out any errors.
Logged
"I have no special talents. I am only passionately curious."

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2221
    • View Profile
Re: On the Job: f.ds edition
« Reply #105 on: May 13, 2015, 02:20:55 pm »
0

Heh, I found a message I wrote defending our department's use of SnagIt. The IT department wanted to remove it, reasoning that Windows already has a screen-capture tool. It was my job to outline how we use SnagIt and how the Windows Snipping Tool does not meet our needs.

We won, and new licenses were purchased for SnagIt. I feel like that would have been cheaper to do in the first place than to have to spend all those hours researching Windows Snipping Tool and writing up a comparison.
Logged
A man has no signature

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3500
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: On the Job: f.ds edition
« Reply #106 on: May 13, 2015, 11:42:10 pm »
0

Need help!

I am starting to get my hands dirty with C. I had only really used Python before. Python has this cool thing where when you run a buggy script and it crashes, it will helpfully indicate where exactly it crashed and why, what was calling which function, etc. Now, with C, the compiler (gcc) is nice enough to tell you this sort of thing, but obviously it can't find everything that would result in runtime errors, and now I've got a script that compiles "nicely" but only outputs "segmentation fault: 11" when I try to run it, which is the opposite of useful to find the origin of the problem in the dozen or so source files I have. I've tried some old school print debugging in the main script, but it crashes before it even reaches the first printf, so I don't have any idea of how to debug this.

Does the council of sages have any recommendations?
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1918
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2320
    • View Profile
Re: On the Job: f.ds edition
« Reply #107 on: May 14, 2015, 01:22:00 am »
+1

Are you compiling with the -Wall flag?

I have no other suggestions.
Logged

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2856
    • View Profile
Re: On the Job: f.ds edition
« Reply #108 on: May 14, 2015, 02:34:01 am »
+1

Learn how to use gdb, the C debugger. It will be painful to start with but it will basically save your life, because it's one of the few ways to get a stack trace in C. (where stack trace == the list of function calls Python gives you for free.)

I don't do much C, but I believe the following should work.

- Compile your program with the -g flag (this adds debugging hooks to your program...or something along those lines. It lets you use gdb on your executable. I'm not sure how it actually works.)
- Run "gdb <executable name>"
- This should put you into an interpreter prompt on the command line. From here, you'll have to look up the gdb commands, because I don't remember them off the top of my head. I believe "break <line num>" or "break <function name>" puts a breakpoint at that point in the code. It might be <filename>:<linenum/function> to specify a certain file but you should look that up. "r" or "run" starts running your program, and pauses it at the first breakpoint it hits.
- Once at a breakpoint, "bt" or something similar gives you a backtrace. There's some command for listing current variable contents, another for printing things. To start running from a breakpoint, you can either do "step"/"s", "next"/"n", "continue"/"c".

Step = execute the next line, then pause. If the next line is a function call, step into that function call. (stops at the first line of that function's code)
Next = execute the next line, then pause. If the next line is a function call, run that function call in full before stopping.
Continue = execute until the next breakpoint.

One of my courses gave a virtual machine with cgdb installed, which is gdb except it automatically displays the code in the terminal instead of just the line number. If you're on a Linux system you can probably install it pretty easily, and it may be more helpful than plain gdb.

Edit: You can also try the binary search trick if your code is structured nicely enough. Put printf at the very start (as in, literally first line) to make sure you can actually run prints. Then place printf in the middle. If fail, move printf to ~1/4 of the way in. If success, move to ~3/4 of the way in. Do binary search on your printf location until you figure out the rough area where it crashes, repeat for other functions.
« Last Edit: May 14, 2015, 02:40:05 am by Titandrake »
Logged
I have a blog! It's called Sorta Insightful. Check it out?

pubby

  • Minion
  • *****
  • Offline Offline
  • Posts: 548
  • Respect: +1046
    • View Profile
Re: On the Job: f.ds edition
« Reply #109 on: May 14, 2015, 06:48:58 am »
+1

Check out the valgrind tool. It will likely give you more information than gdb for errors such as yours.
Logged

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3500
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: On the Job: f.ds edition
« Reply #110 on: May 14, 2015, 10:59:18 am »
0

Thanks guys. I had already installed gdb and valgrind. I am still not too sure how to use them yet, but I did manage to find out the line where it crashed with gdb, and I fixed the problem in minutes (there was a missing header)*.

Success!


*The compiler actually warned me about it (implicit function declaration), but it was lost in a sea of identical warnings, I guess because the original author of the code had a different compiler or setup that took care of them.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

Polk5440

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1708
  • Respect: +1788
    • View Profile
Re: On the Job: f.ds edition
« Reply #111 on: May 14, 2015, 03:04:49 pm »
+1

Continue to use Python, instead.
Logged

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3500
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: On the Job: f.ds edition
« Reply #112 on: May 14, 2015, 03:44:10 pm »
+1

Believe me, I wish it was up to me.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3500
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: On the Job: f.ds edition
« Reply #113 on: May 20, 2015, 12:33:33 am »
+4

Continuing with my forays into C and C++... The more I learn about strings and how they are handled, the less probable it seems that I will be able to see beauty in the World ever again.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

pedroluchini

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 205
  • Respect: +205
    • View Profile
Re: On the Job: f.ds edition
« Reply #114 on: May 20, 2015, 04:28:24 am »
+1

Continuing with my forays into C and C++... The more I learn about strings and how they are handled, the less probable it seems that I will be able to see beauty in the World ever again.

Using raw pointers (char *) for string manipulation leads to madness. Are you using std::string?
Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7866
    • View Profile
Re: On the Job: f.ds edition
« Reply #115 on: May 20, 2015, 04:36:34 am »
+2

Continuing with my forays into C and C++... The more I learn about strings and how they are handled, the less probable it seems that I will be able to see beauty in the World ever again.

Using raw pointers (char *) for string manipulation leads to manliness.

Fixed that for you.
Logged

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2221
    • View Profile
Re: On the Job: f.ds edition
« Reply #116 on: May 20, 2015, 08:05:01 am »
0

They announced the resignation of one of the supervisors, and I just don't feel a loss. I feel kind of conflicted at that, because it's not like she and I have butted heads or anything. In fact, she's been polite to me, but I know that she's one of those ladder-climbers who cares only for herself, so even I take her politeness with a grain of salt. It helps that I know some of the people who've been under her, and I know they won't miss her. She would send out start-up notes with a question at the end that required a mandatory response so she knows her employees read the notes. The questions were dumb like, "Tell me where you want to vacation," or, "What fruit would you be?"

Maybe she bugs me because she acts like the stereotypical manager, even though not all managers are that way.
Logged
A man has no signature

SwitchedFromStarcraft

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1088
  • Respect: +856
    • View Profile
Re: On the Job: f.ds edition
« Reply #117 on: May 20, 2015, 08:29:17 am »
+1

The question at the end of the memo is an interesting strategy.  It could be considered good management, but it could just be an obsession with control.

It is a valuable tool on applications though, as it will help you screen candidates quickly and effectively.  My applications always had a final sentence at the bottom of the page, that read "on the back of this page, write a one-paragraph explanation of why you are the best candidate for the position".  There were always about half that didn't have anything on the back, so those went in the trash.  I don't hire folks that either can't read or can't follow directions.

Does she set her meetings at times other than the hour, half hour, or quarter hour?  Several high level managers I have known use odd times like 8 minutes or 12 minutes after the hour.  They said it makes the time stand out in everyone's mind, and that focus reinforces punctuality.  I always thought it was the equivalent of a dog marking its territory.
Logged
Quote from: Donald X.
Posting begets posting.

Quote from: Asper
Donald X made me a design snob.

There is a sucker born every minute.

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2221
    • View Profile
Re: On the Job: f.ds edition
« Reply #118 on: May 20, 2015, 09:04:11 am »
0

The question at the end of the memo is an interesting strategy.  It could be considered good management, but it could just be an obsession with control.

I could see that tactic being put to good use, but this one is a control freak. Even though I didn’t interact with her much, I could see that. The grumblings I've heard from others indicate that she makes micromanagement an art form.

It doesn't help that it was such a blatant ploy. At least your application example has a practical façade. Someone reading it would assume that they ran out of room on the front, so they asked you to continue to the back. That's actually pretty clever.
Logged
A man has no signature

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3500
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: On the Job: f.ds edition
« Reply #119 on: May 20, 2015, 05:52:22 pm »
0

Continuing with my forays into C and C++... The more I learn about strings and how they are handled, the less probable it seems that I will be able to see beauty in the World ever again.

Using raw pointers (char *) for string manipulation leads to madness. Are you using std::string?

std::strings are more reasonable than c-strings. I just wish it was made the default string of C++, so that I don't have to constantly juggle between the two to get things to work.

I also have to use a compiler (actually an interpreter, but nevermind) that doesn't accept C++11, so no stoi() and the like for me.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

pedroluchini

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 205
  • Respect: +205
    • View Profile
Re: On the Job: f.ds edition
« Reply #120 on: May 21, 2015, 05:31:48 am »
0

std::strings are more reasonable than c-strings. I just wish it was made the default string of C++, so that I don't have to constantly juggle between the two to get things to work.

There's a lot of dynamic memory allocation happening behind the scenes when you use std::string. C++ is designed for low-level, high-performance, limited-resources environments, where that kind of cost is unacceptable.

I totally understand your frustration, though. The learning curve is steep.
Logged

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3500
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: On the Job: f.ds edition
« Reply #121 on: May 21, 2015, 07:46:49 pm »
0

It's more like:

-Man, C-strings sure are awkward to use.
-Use std::strings instead! They are much more convenient.
-... Now my code doesn't compile.
-Yes, you have to use C-strings anyway.
-???

What bothers me about this is that, unlike other C/C++ features, the amount of extra complexity doesn't correspond to extra functionality. I'm guessing it's a limitation of the strongly typed nature of the language, and I am not yet used to this kind of thing.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

pedroluchini

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 205
  • Respect: +205
    • View Profile
Re: On the Job: f.ds edition
« Reply #122 on: May 22, 2015, 04:39:06 am »
0

If you're dealing with an API that only accepts C-strings, you can do all your manipulation using std::string and at the last moment you call c_str() to get a char*. Something like this:

Code: [Select]
std::string foo = "I can has";
std::string bar = "cheezburger";
std::string foobar = foo + bar;
silly_api_that_takes_char_ptr(foobar.c_str());

...and you can shorten the last two lines to:

Code: [Select]
silly_api_that_takes_char_ptr((foo + bar).c_str());
Logged

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2221
    • View Profile
Re: On the Job: f.ds edition
« Reply #123 on: May 22, 2015, 10:09:43 am »
+1

The more managers that get added to this project, the longer it's going to take.
Logged
A man has no signature

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7866
    • View Profile
Re: On the Job: f.ds edition
« Reply #124 on: May 22, 2015, 10:29:53 am »
+2

The more managers that get added to this project, the longer it's going to take.

Need to get a manager to manage the addition of managers to the project, obviously. 
Logged
Pages: 1 ... 3 4 [5] 6 7  All
 

Page created in 0.059 seconds with 22 queries.