|
Forum: General Stuff Topic: Work started by: TheCatt Posted by TheCatt on Jun. 05 2012,17:58
Jesus fucking Christ.So my manager quit a couple of weeks ago. He wanted me to be the next manager, and thought I'd do well, etc. We then had some transition meetings in which he basically told me half the people on the team were crap or had significant issues in their work, and half the projects the team had worked on were time bombs. As a manager, he makes you feel great, because he'll a) stick up for you no matter what, b) stick up for the team, and c) only say good things. During our transition meetings, he talked shit about half the people, and said I needed to be on them like a hawk. (Um, what were you doing the past 3 years, mr quitting?) Thib knows this guy from a place we all used to work. He quits, I was named Acting Manager. Despite there being 2 holidays and 4 weekend days since he quit, I've worked every damned day. Last Friday, someone had been working on something for >3 days. It was about 1/2 to 1 day of work. I got into a management meeting, and two managers told me that a particular database upgrade wouldn't work according to that person. "No, all upgrades work" I said. They said employee X said otherwise. So after the meeting, I talked to employee X and he stated that he was correct. I asked why? "Because that's how I fixed the previous problem." Apparently creating a WHOLE NEW PROBLEM was his solution. And taking 3.5 days to do it. (Quite frankly, it was 4 hours of work) The release manager announced that everyone would be working that weekend. This employee said "Hell if I'm working on this god damned stuff all weekend" and stormed off. Two weeks before, another manager had put him up for a promotion, which was in progress. This week, I stopped it. Within a month, he'll be on a "performance improvement plan" aka: you're getting fired in 3 months. Meanwhile, for the whole two weeks, one employee has been a raging BITCH about me getting the acting manager title. I offered it to him, and I said if he were interested, he should apply or let the director know. "They're just going to hand it to you" was his response. Note: Of the 8 developers on the team, these are the two worst. Employee A is #1 worst, BITCH is #2 worst. Posted by GORDON on Jun. 05 2012,18:02
Behead them both, put their heads on pikes outside your office door, as a warning to the rest.
Posted by GORDON on Jun. 05 2012,18:03
Or, as an experiment, behead the incompetent one and see how that affects the one with the bad attitude.
Posted by unkbill on Jun. 05 2012,18:16
If it will make you feel better I can do a better job then them and not know the job and you can fire me! Then show them what I can do no training, an maybe one or both will shot themselves in the headOr if I don't do that great of a job I can shot one of them. Let me know. Thanks Unk. Hang in Hang out Live long or in some cases love bunnies Posted by thibodeaux on Jun. 05 2012,18:54
This is why I don't want to be a manager.
Posted by unkbill on Jun. 05 2012,19:25
Luke, Bunny Lover, Follow the force. Hire Unkbill at 100k a year.
Posted by GORDON on Jun. 05 2012,19:27
(unkbill @ Jun. 05 2012,22:25) QUOTE Luke, Bunny Lover, Follow the force. Hire Unkbill at 100k a year. I think it would be a good investment to hire a biker to go to the movies with you... buy his ticket, and give him $50. Then if anyone talks or uses a cellphone during the film, biker gets up and gets all confrontational. He might get kicked out after the first fight, but it will serve as a warning to others. Posted by TheCatt on Jun. 05 2012,21:12
(unkbill @ Jun. 05 2012,21:16) QUOTE If it will make you feel better I can do a better job then them and not know the job and you can fire me! Then show them what I can do no training, an maybe one or both will shot themselves in the head Or if I don't do that great of a job I can shot one of them. Let me know. Thanks Unk. Hang in Hang out Live long or in some cases love bunnies I've missed you, unk Posted by TheCatt on Jun. 05 2012,21:16
(thibodeaux @ Jun. 05 2012,21:54) QUOTE This is why I don't want to be a manager. My brother became a development manager for the first time 2 months ago. Me: So what's the salary bump like? Him: 10% or so, at least in my experience, and others I know. Me: That doesn't sound worth it. Him: You really only become manager if you want to be a director some day. That's where the money is. So yeah... I'm torn. Quite frankly, it doesn't seem worth it, especially when people will pay me $100-125/hour to do consulting on the side. On the other hand, I like the idea of trying to guide the team to create better products, etc. On the other other hand, see post 1. Posted by TPRJones on Jun. 06 2012,05:52
Yeah, guiding the team to make things better is nice in theory, but you have to make sure you're doing it at a company that isn't so hopeless as to make that completely impossible.
Posted by TheCatt on Jun. 07 2012,08:15
So despite employee A being the least competent person on the team, the former manger was PUSHING for a big raise for him. The former mgr had told me that two OTHER managers had been pushing for it, and he was happy to let it happen. Well, turns out according to managers at a mtg with him, HE was the one pushing. So that stopped.Then, it turns out employee B from above, who's pretty good, not excellent, was on a list to be on a performance improvement plan... but employee A, who completely sucks, was getting a big raise. WTF? For comparison, I'd give employee B a 7/10... I'd give employee A a 4/10, at best. Posted by TheCatt on Jun. 25 2012,11:20
Well, I officially accepted on Thursday. New title: Senior Manager of Database Development (or something to that effect).So I get: new title $15k pay raise 15% annual bonus (previous bonus: 0%) new laptop some development software I've wanted for a while To tell people what to do Posted by thibodeaux on Jun. 25 2012,11:37
Congratulations: you are now The Man.Damn You. Posted by TheCatt on Jun. 25 2012,16:14
Thanks... money's not everything... but it's sure nice.
Posted by GORDON on Jun. 25 2012,17:54
Don't get an ulcer.
Posted by TheCatt on Jun. 25 2012,18:05
(GORDON @ Jun. 25 2012,20:54) QUOTE Don't get an ulcer. Hah, you're almost 10 years too late. Posted by GORDON on Jun. 25 2012,18:06
(TheCatt @ Jun. 25 2012,21:05) QUOTE (GORDON @ Jun. 25 2012,20:54) QUOTE Don't get an ulcer. Hah, you're almost 10 years too late. Don't exacerbate the ulcer. Posted by TheCatt on Jan. 12 2013,18:56
Well, I am resigning as manager. Glad I tried it, but ultimately, I just didn't care for it. I really enjoyed the internal parts: dealing with my own team, leading projects, motivating people, coming up with ideas for improvement. We GREATLY improved the performance of our system. Our most critical reporting process went from 11 hours to 38 minutes. Previous manager had been working TWO YEARS to come up with the 11 hour solution. We did the 38 minutes in 1.5 months.I even enjoyed working with customers. Sure, they're demanding, but that's their job. It was mostly fun. The part I disliked the most: Working with other managers, upper management, and representatives from other departments. I like my boss, the director of engineering. But getting people to care about "The product" instead of their own little pet projects and initiatives is painful. The good news: I get to keep the pay raise and the bonus, and I'll be a manager-level individual contributor, database architect. So I'll still get to do the technical leadership/fun stuff, but we'll get a more peoply manager person to take over the managerial side of things. I've had that role/arrangement twice before, and have found it to be my favorite way to work Posted by thibodeaux on Jan. 13 2013,05:56
My manager just resigned (Catt, you know him: Mark I.) Anyway, our company is still small enough that the engineering managers report directly to the VP. Well, now MY TEAM reports directly to the VP. We'll see how that works out.
Posted by Malcolm on Jan. 13 2013,09:40
I still have yet to see our PM, although I saw the dude that lasted for about a month that came before him. For all I know, he's just a figment of someone's overactive imagination. Management seems to have a large burnout rate.
Posted by TheCatt on Apr. 25 2013,16:57
I resigned as manager, effective in two weeks.Staying at the company, just going back to being an engineer. Posted by GORDON on Apr. 25 2013,18:44
Now your coworkers can look at you and say YOU'RE NOT MY SUPERVISOR!
Posted by TheCatt on May 28 2013,17:41
I think the best part is that when management does stupid things, like today, at least I can say I'm not part of management.God management is dumb. Posted by Malcolm on May 28 2013,17:54
(TheCatt @ May 28 2013,19:41) QUOTE God management is dumb. Amen. Posted by Malcolm on May 29 2013,17:12
Answer: Three weeks.Question: When setting up an automated file copy process, how long does it take a project manager and techie admin to determine and agree upon the source directory? Mystery: Why the fuck was it three weeks of my time instead of theirs? And why the fuck was it 2.9999999999 weeks of listening to them disagree and 0.0000000001 weeks of me getting the correct privs to check myself? Posted by TheCatt on Sep. 13 2013,18:04
Today, I was promoted to Senior Principal Engineer. Basically, it means database/software architect. I am considered a management-level individual contributor. So I get the management bonus (15%), but none of the management shit.Oh, and I got two cakes + ice cream. woot. Oh.... and this guy: QUOTE Last Friday, someone had been working on something for >3 days. It was about 1/2 to 1 day of work. I got into a management meeting, and two managers told me that a particular database upgrade wouldn't work according to that person. "No, all upgrades work" I said. They said employee X said otherwise. So after the meeting, I talked to employee X and he stated that he was correct. I asked why? "Because that's how I fixed the previous problem." Apparently creating a WHOLE NEW PROBLEM was his solution. And taking 3.5 days to do it. (Quite frankly, it was 4 hours of work) The release manager announced that everyone would be working that weekend. This employee said "Hell if I'm working on this god damned stuff all weekend" and stormed off. The best part about being manager: I gave him the lowest performance rating possible, and no raise. He ended up quitting a few months later. Win. Posted by Malcolm on Sep. 13 2013,21:07
On my team of four devs, I'm now the only one doing any work on our main project. Three are pimped out to other projects, I'm pimped out 2/3rds of the way. This wouldn't be so bad except that we've averaged one huge critical showstopping production issue per week over the past couple months. But management assures us they give a fuck about our project.
Posted by thibodeaux on Sep. 14 2013,04:22
(TheCatt @ Sep. 13 2013,21:04) QUOTE Today, I was promoted to Senior Principal Engineer. Basically, it means database/software architect. I am considered a management-level individual contributor. So I get the management bonus (15%), but none of the management shit. That's the perfect job. Posted by TheCatt on Feb. 03 2014,10:53
One of our customers is going live on our software in two months. I just found this out.Me: We have two projects in progress to test their software configuration, but those projects won't be completed until May. They can't test their configuration until those projects are complete. There's no way they can go live in April. Marketing: Just change those projects to have deliverables in line with their testing. Me: OK, buy me a time machine. Posted by Malcolm on Feb. 03 2014,11:26
90% of software pain I've dealt with comes from idiot managers moving deadlines up and biz analysts getting initial requirements wrong and/or changing existing requirements. I've stopped putting anymore than five minutes of forethought into code design.
Posted by Malcolm on Feb. 24 2014,20:41
Work has been driving me insane recently. Last year, this joint made me sit through 4 hours worth of interactive "bronze" computer security training. Managers had to sit through that plus about three or four times more ("silver" training). It's completely worthless and obviously written by someone that gives exactly zero fucks about actual computer security. You wade through a sea of mediocre slides that could have been done on Powerpoint, but some ass clown decided to Java that shit up, so it takes ten times as long to load as Powerpoint. In between sets of slides, you take multi-choice tests. You have infinity tries and the set of questions they swap out for new ones is limited at best. If you're literate, you should have no problem. Even if you're not, an IQ above 50 should work. If that's troublesome, systematic answer selection eventually gets you past things.This training was immediately put to the test by two situations: Management: Since you migrated domains you need to renew your security certificate so you can RDP to your machine. Me: Ok. You realize I'm up on call next week and if I can't RDP in and something happens, you're pretty much screwed, right? You also realize there is a deploy happening in production next week? Which is sort of why I requested the migration be delayed and why I'm currently delaying setting up my new desktop. So, whatever. I start following the docs on the process last Friday morning. I follow every step which assures me, so I've been told, a genuine certificate. Nope. It's a genuine certificate request which hasn't budged a smegging inch since last week. But part of the step-by-step process involves me clicking on a link in an e-mail with an invalid digital signature to an off-shore URL. It was so bad, I actually reported it as spam to the email admins. Nope. That shit is legit. I reminded the manager that is the exactly the kind of thing their training said I should never, ever click on. Because reputable vendors keep that shit up to date. We are also in the middle of implementing a large security flaw in our code on purpose because we made some crazy, crazy-ass pinkie swears with a client. As an added bonus, we have to get inspected by a security bot scan once a quarter. Most recent scan came back more in the red than normal because they've tightened their standards. The red falls on my shoulders. Fixing it in the month they've given me will be a damn miracle. Me: You realize that this introduces numerous holes in our website that violate every single information integrity principle I know? In fact, this goes 180 degrees against a fix we just put in last week to fill a separate but equally dangerous hole. The Biz: Yeah but we promised this three months ago. Me: So they don't have it now, they still won't. The Biz: They already know we do it for someone else. Me: [looks at team manager who doesn't realize the first "it" got approved when the bot was looser and no one really gave a fuck about site access control] We do it for someone else? Team manager: [with a stare that makes a deer in the headlights look positively deep in thought and a tone that makes Bill Lumbergh sound uplifting and motivational] I think we have to put this in. Posted by TPRJones on Feb. 24 2014,21:04
Here's what I imagine the documented process is to give Malcolm an assignment at work:1) write up what you need in a note 2) tie the note to the neck of an unopened bottle of whiskey 3) open office door, slide whiskey in, close office door 4) run Posted by Malcolm on Feb. 24 2014,21:59
(TPRJones @ Feb. 24 2014,23:04) QUOTE Here's what I imagine the documented process is to give Malcolm an assignment at work: 1) write up what you need in a note 2) tie the note to the neck of an unopened bottle of whiskey 3) open office door, slide whiskey in, close office door 4) run Office door? Not even close. Also found out that I was forcibly migrated to a new domain at work ... and they're already issuing bad security certs for it. Naturally, there's a form to fill out to get a corrected cert. It's a known issue and they still do it. And they still force people to the new domain. And you have to go through an artificial step to finish it. W. T. F. I hope the Linux boxes go on the tweek. Everyone there is allergic to that OS and refuses to learn it should I need to go to a non-extradition country for a few weeks. Posted by thibodeaux on Feb. 25 2014,04:30
I just started a new job 2 weeks ago. I have an office. In fact, they built out our whole area to be offices. They're not, like, Don Draper offices, but they're new, shiny, have motorized desks (so you can do the standing thing), and half of them have windows.
Posted by TheCatt on Feb. 25 2014,06:03
(thibodeaux @ Feb. 25 2014,07:30) QUOTE I just started a new job 2 weeks ago. I have an office. In fact, they built out our whole area to be offices. They're not, like, Don Draper offices, but they're new, shiny, have motorized desks (so you can do the standing thing), and half of them have windows. Different company? Posted by thibodeaux on Feb. 25 2014,12:12
yep
Posted by GORDON on Feb. 25 2014,12:15
Are you going to exceed or merely meet expectations, there?
Posted by TheCatt on Feb. 25 2014,12:24
So... did your old place take down the recruiting video that was starring you? Posted by thibodeaux on Feb. 25 2014,12:29
(TheCatt @ Feb. 25 2014,15:24) QUOTE So... did your old place take down the recruiting video that was starring you? Not yet. Although they were re-shooting it on my last day. WTF, my seat wasn't even cold. Posted by thibodeaux on Feb. 25 2014,12:29
(GORDON @ Feb. 25 2014,15:15) QUOTE Are you going to exceed or merely meet expectations, there? I've got 35 pieces of flair. Posted by Malcolm on Jul. 18 2014,14:00
A couple months ago, management decides to gut our dev team (responsible for 2 closely integrated products) to the tune of 50% because our funding's suddenly been cut. A couple weeks ago, we successfully beg for more cash. Unfortunately, that was a couple weeks after we told our final contractor we couldn't afford him anymore, so he ended up going to the same place the other 50% went ... the new team that's management's favourite that got all our (and many other people's) fucking money. So, more funding + skeleton crew = additional "resourcing."The two managers above me are on vacation. The one above them is far too removed from day-to-day ops to handle anything. The two other devs are really there to deal with the other project we're responsible for and their personalities ... they aren't exactly the "take charge and get shit done" type. I, on the other hand, paid attention to Hannibal from The A-Team way too often which means I think I can assemble a fully functional all-terrain tank using only parts in an abandoned auto repair center in under an hour. Which means I'm pretty much in charge of hiring a couple contractors. Resumes started coming in today. A word of advice to the folks on this board whose progeny might find themselves in the IT industry one day: If you are going for a software development position, do not leave the "technical skills->programming languages" section blank. Posted by TheCatt on Jul. 18 2014,15:04
How's the resume going?
Posted by Malcolm on Jul. 18 2014,15:39
(TheCatt @ Jul. 18 2014,17:04) QUOTE How's the resume going? I'm in such a strong bargaining position right now, you've got no idea how tempted I am to apply pressure. It has been extra special ridiculous the past two months. 6.5 months and counting to migrate source code from one TFS server to another, just for starters. Buddy of mine could probably get me a consulting gig, but he makes approximately what I do now. He also has to wear suits and dress up going into work. I can wear cargo pants and T-shirts I buy from random places. It's an insanity to be certain, but it's still in the "contained, manageable" quadrant of the FML chart. No major assholes on the immediate team, either. Phone interviews start Monday. Jeebus save me. Posted by TheCatt on Jul. 18 2014,16:05
I wear shorts. T-shirts if I want to.
Posted by Malcolm on Jul. 18 2014,18:42
(TheCatt @ Jul. 18 2014,18:05) QUOTE I wear shorts. T-shirts if I want to. Most people think I'm insane when I tell them the value I place on required wardrobe at work. I hate suits. You look like you're covering up your shortcomings with expensive fabrics. I hate ties. They remind me of nooses. Posted by Malcolm on Jul. 22 2014,15:46
QUOTE A word of advice to the folks on this board whose progeny might find themselves in the IT industry one day: If you are going for a software development position, do not leave the "technical skills->programming languages" section blank. Word of advice #2: If you claim a decade of Java and .Net/C# experience, the question, "What is class inheritance," should not elicit a response that involves the word "google." Motherfucking wtf? Thank Christ this was one of the calls one of the coworkers was on, because no one would believe me. Posted by TheCatt on Jul. 22 2014,18:16
Our HR person came by today and asked me some questions about our director.She wins points for: 1) Opening with "You're not in trouble, I just want to bounce things off of you." [I, for one, never assume HR is around for good things] 2) Concluding the conversation with, "Yeah, I think some people just need to put their big boy pants on." Posted by Malcolm on Aug. 01 2014,15:40
Interview process is fucking over in another 2 days. Halle-fucking-lajuah. We have what is more or less a 2-question techie interview.< Question 1 >. I'd say 50% of the candidates fucked it up. Of that 50%, no one has gotten the best solution. One realized that "divisible by 3 AND divisible by 5" is secret code for "divisible by 15." Fucking hell. < Question 2 >. The ball-breaker. No one has gotten this without at least a bit of help. They'd get major bonus points if they gave me the performance optimized version off the bat. This single question has shot down more candidates than any techie question, resume, personality issues combined. Goddamn recruiting firms. It's like being repeatedly < helicoptered > by the unemployable as they rotate on a large, invisible merry-go-round. Posted by TheCatt on Aug. 01 2014,16:43
OK, so how would you solve #1? I mean isn't it just: public function PrintSomething(int i) { if (i % 3 == 0) { Console.Write("Fizz"); } if (i % 5 == 0) { Console.Write("Buzz"); } } Posted by thibodeaux on Aug. 01 2014,18:32
you gotta write the number if it's not a 3 or 5. But yeah I don't get why it's hard.
Posted by TheCatt on Aug. 01 2014,18:44
(thibodeaux @ Aug. 01 2014,21:32) QUOTE you gotta write the number if it's not a 3 or 5. But yeah I don't get why it's hard. Apparently it's hard for me cuz I missed the entire first sentence. static void Main(string[] args) { int i =1; while (i<= 100){ if (!(i % 3 == 0 ) && !( i % 5 == 0)) { Console.WriteLine(i.ToString()); } else { if (i % 3 == 0) { Console.Write("Fizz"); } if (i % 5 == 0) { Console.Write("Buzz"); } Console.WriteLine(""); } i++; } } There, even with pretty line formatting. Posted by Malcolm on Aug. 02 2014,10:48
(TheCatt @ Aug. 01 2014,18:43) QUOTE OK, so how would you solve #1? I mean isn't it just: public function PrintSomething(int i) { if (i % 3 == 0) { Console.Write("Fizz"); } if (i % 5 == 0) { Console.Write("Buzz"); } } So close. Just add print(i) at the bottom of the function, jab that function inside a loop that runs 1 to 100 inclusive, and you w1n. Space- and time-optimal. Posted by Malcolm on Aug. 02 2014,10:48
(TheCatt @ Aug. 01 2014,20:44) QUOTE (thibodeaux @ Aug. 01 2014,21:32) QUOTE you gotta write the number if it's not a 3 or 5. But yeah I don't get why it's hard. Apparently it's hard for me cuz I missed the entire first sentence. static void Main(string[] args) { int i =1; while (i<= 100){ if (!(i % 3 == 0 ) && !( i % 5 == 0)) { Console.WriteLine(i.ToString()); } else { if (i % 3 == 0) { Console.Write("Fizz"); } if (i % 5 == 0) { Console.Write("Buzz"); } Console.WriteLine(""); } i++; } } There, even with pretty line formatting. Not optimal in terms of space. Entirely correct, though. Beats 75% of our interviewees, easy. The dude in the link makes an attempt to explain why it's hard for someone who only knows how to code in a formulaic manner. If you really suck at freeform logic and are nothing more than a flesh-and-blood coding robot, this problem appears to expose that. The bit that's killing me is that the candidates are dudes with, on average, 10+ years of senior/lead experience. I get that commanders probably forget how to dig trenches and can't shoot for shit, but then why apply for a job as a frontline merc? Posted by TheCatt on Aug. 02 2014,11:32
(Malcolm @ Aug. 02 2014,13:48) QUOTE (TheCatt @ Aug. 01 2014,18:43) QUOTE OK, so how would you solve #1? I mean isn't it just: public function PrintSomething(int i) { if (i % 3 == 0) { Console.Write("Fizz"); } if (i % 5 == 0) { Console.Write("Buzz"); } } So close. Just add print(i) at the bottom of the function, jab that function inside a loop that runs 1 to 100 inclusive, and you w1n. Space- and time-optimal. Well, that's not right, because it would always print the number. So what's not space optimal about the 2nd one? Posted by thibodeaux on Aug. 02 2014,11:50
Fuck "optimal." Let the compiler worry about that.Or else write it in assembler. Posted by Malcolm on Aug. 02 2014,11:58
(TheCatt @ Aug. 02 2014,13:32) QUOTE (Malcolm @ Aug. 02 2014,13:48) QUOTE (TheCatt @ Aug. 01 2014,18:43) QUOTE OK, so how would you solve #1? I mean isn't it just: public function PrintSomething(int i) { if (i % 3 == 0) { Console.Write("Fizz"); } if (i % 5 == 0) { Console.Write("Buzz"); } } So close. Just add print(i) at the bottom of the function, jab that function inside a loop that runs 1 to 100 inclusive, and you w1n. Space- and time-optimal. Well, that's not right, because it would always print the number. So what's not space optimal about the 2nd one? Oh yeah. Fucking else block. Posted by Malcolm on Aug. 02 2014,12:04
(thibodeaux @ Aug. 02 2014,13:50) QUOTE Fuck "optimal." Let the compiler worry about that. Or else write it in assembler. Our source is replete with redundant variables and arrow code up the ass. Debugging is 90% of our work and it's because we don't centralize shit; it's illegal. I don't mean the best performance, I mean code that functions and is both readable and concise to boot. Posted by TheCatt on Aug. 02 2014,13:17
(Malcolm @ Aug. 02 2014,14:58) QUOTE Oh yeah. Fucking else block. I'm going to say you are wrong. If you don't have the else block, you needlessly re-evaluate both of the expressions, when you know they will both be false, wasting CPU cycles. Posted by GORDON on Aug. 02 2014,13:26
(thibodeaux @ Aug. 02 2014,14:50) QUOTE Fuck "optimal." Let the compiler worry about that. Or else write it in assembler. I like writing the fewest number of lines as possible. If I can break a repeated process out of inline and it takes fewer lines to load the paramaters up and make the call to do so, then I do that. That's mainframe talk tho, yo. Posted by Malcolm on Aug. 02 2014,15:56
Less code = less shit that can go wrong.
Posted by GORDON on Aug. 02 2014,16:13
My personal assessment of my own code, once I had the eyes to make that kind of analysis, is that my code tends to be more utilitarian than artistic. I've seen things I have done redone now and again to be prettier, but not with any better functionality.
Posted by TPRJones on Aug. 04 2014,13:55
Not sure of the exact syntax of the language you are using, but I think this would be close to maximum efficiency (please excuse my pseudocode):public function FizzBuzzLoop(int i) { str thistime = null; if (i % 3 == 0) { thistime = "Fizz"; } if (i % 5 == 0) { thistime = thistime + "Buzz"; } if (thistime == null) { Console.WriteLine(i.ToString()); } else { Console.WriteLine(thistime); } if (i < 101) { FizzBuzzLoop(i+1); } } One less evaluation and it swaps in recursion in place of a while loop. Posted by Malcolm on Aug. 04 2014,14:50
(GORDON @ Aug. 02 2014,18:13) QUOTE My personal assessment of my own code, once I had the eyes to make that kind of analysis, is that my code tends to be more utilitarian than artistic. I've seen things I have done redone now and again to be prettier, but not with any better functionality. After debugging other people's code enough, I place readability on a very high level. Posted by TheCatt on Aug. 04 2014,15:32
(TPRJones @ Aug. 04 2014,16:55) QUOTE Not sure of the exact syntax of the language you are using, but I think this would be close to maximum efficiency (please excuse my pseudocode): public function FizzBuzzLoop(int i) { str thistime = null; if (i % 3 == 0) { thistime = "Fizz"; } if (i % 5 == 0) { thistime = thistime + "Buzz"; } if (thistime == null) { Console.WriteLine(i.ToString()); } else { Console.WriteLine(thistime); } if (i < 101) { FizzBuzzLoop(i+1); } } One less evaluation and it swaps in recursion in place of a while loop. The recursion is unnecessary. And inefficient, as you will be increasing your memory allocation for the variables you create with each call, that won't go out of scope since your calls are now nested. Posted by TPRJones on Aug. 04 2014,15:37
Oh. Well, nevermind then.Need a better language. Recursion is too awesome to sacrifice to bad memory management. Posted by TheCatt on Aug. 04 2014,15:50
(TPRJones @ Aug. 04 2014,18:37) QUOTE Oh. Well, nevermind then. Need a better language. Recursion is too awesome to sacrifice to bad memory management. I'm not sure what language that would be possible in. That Fibonacci solution for recursion is nice. Posted by thibodeaux on Aug. 04 2014,16:03
(TPRJones @ Aug. 04 2014,18:37) QUOTE Oh. Well, nevermind then. Need a better language. Recursion is too awesome to sacrifice to bad memory management. Some LISPs have "tail recursion" which can be implemented as a GOTO. No memory problems. Posted by TPRJones on Aug. 04 2014,16:22
I could do it in Forth. Or declare the variables as globals instead (Pascal, Fortran, many others), although that's bad for other reasons.
Posted by Malcolm on Aug. 04 2014,16:28
(TheCatt @ Aug. 04 2014,17:50) QUOTE (TPRJones @ Aug. 04 2014,18:37) QUOTE Oh. Well, nevermind then. Need a better language. Recursion is too awesome to sacrifice to bad memory management. I'm not sure what language that would be possible in. That Fibonacci solution for recursion is nice. Inefficient as hell, too. QUOTE Some LISPs have "tail recursion" which can be implemented as a GOTO. No memory problems. TPR's solution looks tail-recursive (iterative). Run-time is still big-omega(N). In fact, outside of butchering the logic inside the function, it'd be hard to make this recursive in a dangerous way. It's the opposite of the Fibonacci, which is (relatively) difficult to do non-recursively. Someone today, with some hints, finally got the good solution. First one this round. Posted by GORDON on Aug. 08 2014,10:04
So is there some rule in fizzbuzz that says I can't just write a single line of code: print " 1 2 fizz 4 buzz..." Etc?I mean, as long as we are thinking outside the box. Did anyone say it had to be overly complicated? Posted by Malcolm on Aug. 08 2014,10:06
(GORDON @ Aug. 08 2014,12:04) QUOTE So is there some rule in fizzbuzz that says I can't just write a single line of code: print " 1 2 fizz 4 buzz..." Etc? I mean, as long as we are thinking outside the box. Did anyone say it had to be overly complicated? Works fine until you print from 1 to N. EDIT: Contractor managed to renege on his acceptance. Fucking recruiting firms and their visa bullshit. |