|
ManlyWeevil posted:So, I'll be graduating I'm May with a CS degree. I have an on site interview coming up for Microsoft for a Program Manager position. I know its not strictly (at all) a programming position, but how different is it? My two concerns are: if i do get offered the position and i decide in a few years that I hate the design, coordination aspect, am I screwing myself over for a coding position in the future, and the second issue is how different is this from any of my formal training and what could I do to prepare? As far as how different PM is from a programming position, I would have to say "very". It's still in the software development world though, and if for some reason I lost my ability to write code, PM would probably be my first career choice. If you haven't found it yet, here is a post from Steven Sinofsky (now president of the Windows division) on PM. It's long, and a bit old, but worth a read: http://blogs.msdn.com/b/techtalk/archive/2005/12/16/504872.aspxi I can't speak to how anybody in charge of hiring a dev would look at PM time. Personally, I think a couple years in PM would give you some valuable experience in areas that a lot of devs are terrible at. You would have to find a way to keep your coding skills up to snuff though. tk fucked around with this message at 09:16 on Mar 4, 2012 |
# ? Mar 4, 2012 09:12 |
|
|
# ? Apr 28, 2024 22:42 |
|
I've heard of technical PMs, there's no reason why you can't be one of those. Hell I'd prefer a PM who would have some idea of code so that I can explain why his feature is going to take twice as long as his estimates
|
# ? Mar 4, 2012 09:29 |
|
So overall, not a huge mistake in that it's impossible to get to coding if I dislike it? The recruiters I talked to seemed to think it was relatively easy to switch INTO PM, but not out, and but that may just be the way it's structured.
|
# ? Mar 4, 2012 09:41 |
|
ManlyWeevil posted:So overall, not a huge mistake in that it's impossible to get to coding if I dislike it? The recruiters I talked to seemed to think it was relatively easy to switch INTO PM, but not out, and but that may just be the way it's structured. If you're dead set on wanting to code, it's would probably be best to let your recruiter know. They may be able to help you get a look at an SDE or SDET position. If the PM role interests you, there's no harm in going through the process. Try to use your interviews to find out what things would be like. You can always turn down an offer if you decide you want to go another way. It's probably true that it's easier to switch in to PM than out of. Most of the PMs I work with are ex-SDE(T)s that either realize they'll never be tops at their current role or just enjoy the work that the PMs are doing more. tk fucked around with this message at 17:34 on Mar 4, 2012 |
# ? Mar 4, 2012 17:31 |
|
Safe and Secure! posted:
You should be looking into Lucene. That way, you kill two birds with one stone. You'll get to work with a search engine and contribute to an OSS project.
|
# ? Mar 4, 2012 23:25 |
|
ManlyWeevil posted:So overall, not a huge mistake in that it's impossible to get to coding if I dislike it? The recruiters I talked to seemed to think it was relatively easy to switch INTO PM, but not out, and but that may just be the way it's structured. They're right, it will be difficult. Seeing a resume where a developer has moved into another role (BA, PM, etc) is a red flag because there's a thought that they may have been pushed into those roles because they're not very good at development. That doesn't mean it's impossible to go back, but it might not be easy.
|
# ? Mar 5, 2012 04:09 |
|
So I'm preparing for an interview "Global Wealth Management Technology" intern program at Bank of America/Merrill Lynch. Is there any tips out of the ordinary that I should be brushing up on, considering I have no financial background whatsoever and most news story talks about financial stuff (BoA is doing terribly! ) or is just misc. stuff about what some analyst say, how does one do research? For more general intern interview stuff though: What do I do if they ask a question where I can't come up with an answer. Example question from a site "Give me an example of when you took a risk to achieve a goal. What was the outcome?". I cannot think of an example of "taking a risk" in my school projects as I'd obviously not want to risk a bad grade. What would be a proper answer to this? Something like, due to lack of experience I cannot answer your question sounds like something that would reflect poorly. What are good questions to ask at the end of an interview? I'd rather not freeze on the spot when they ask. Also, what's the thought on consistency of questions between interviews? I've got three for BoA and should I ask the same questions at each or try for different questions for each?
|
# ? Mar 5, 2012 04:38 |
|
Contra Duck posted:They're right, it will be difficult. Seeing a resume where a developer has moved into another role (BA, PM, etc) is a red flag because there's a thought that they may have been pushed into those roles because they're not very good at development. That doesn't mean it's impossible to go back, but it might not be easy. Or, in other cases, it's because they ended up pushed into the role because they were the most qualified person to take the position, but they hate it. I was in that position; I ended up as, essentially, the CTO of a small company, and I wanted nothing more than to get back to writing code. On the plus side, it gave me a really easy answer to the question "why are you looking to leave your current position?" I don't mind being a technical lead, but I hate dealing with HR crap. Master_Odin posted:What are good questions to ask at the end of an interview? I'd rather not freeze on the spot when they ask. Also, what's the thought on consistency of questions between interviews? I've got three for BoA and should I ask the same questions at each or try for different questions for each? If the interviewer is a peer: - Why do you like working here? / What's your favorite thing about working here? If you ask that to multiple people and they all have a hard time answering, or if they all seem beaten down/unenthusiastic about the job, the job might suck. I've had people more or less mouth "GET OUT NOW" at me. - Technology questions that weren't fully answered in the body of the interview (specific technologies used) - Joel test questions (if you think they're worth asking!) If the interviewer is your potential boss: - What would you have me working on my first month? - Why should I work here? - HR questions, if it seems like it went well and they're interested in hiring (vacation, benefits, etc) New Yorp New Yorp fucked around with this message at 14:46 on Mar 5, 2012 |
# ? Mar 5, 2012 14:40 |
|
Ithaqua posted:Or, in other cases, it's because they ended up pushed into the role because they were the most qualified person to take the position, but they hate it. I was in that position; I ended up as, essentially, the CTO of a small company, and I wanted nothing more than to get back to writing code. On the plus side, it gave me a really easy answer to the question "why are you looking to leave your current position?" It's not so much that I think I'll hate it, otherwise I would have insisted on a SDE(T) interview. It seems very interesting, but it's also not what I expected when I went into CS. Mostly its a "I don't want to burn bridges" thing than I actually expect to dislike it. The only thing I really can't figure out is what to expect in the interviews. My on-campus was a long discussion of my senior project with the interviewer making up "well, what if..." situations.
|
# ? Mar 5, 2012 21:19 |
|
Hey Goons, I've been having trouble breaking into the field or programming / website programming. Anyone think you could let me know what I'm missing (besides a degree)? Here's my portfolio: quote:Web Portfolio: Please note that the C++ code above doesn't have the best programming practices (vars a b c etc), but my C#.NET program has better practices (string thisIsAString, etc.) I'm having problems even getting an interview (looking both in and outside my current city), so any help would be appreciated! Knyteguy fucked around with this message at 01:49 on Mar 8, 2017 |
# ? Mar 8, 2012 21:23 |
|
Knyteguy posted:Hey Goons, I've been having trouble breaking into the field or programming / website programming. What kind of jobs are you applying to? Edit: Just at a quick glance, your entire resume needs to be reorganized and restructured. Particularly, "advanced loops", "logical solutions to problems" are kind of bullshit bullet points and some of those programming skills are not programming skills at all, and are just basic skills. Also your 2nd bullet point under your experience, "Protected code and forms... Not a single attack " sounds really weird. What is wrong with just writing, "Protected sites from malicious attacks such as SQL Inject, XSS vulnerabilities..." etc. Least of all there's no mention of any algorithms classes you took. Any decent software company (aka the one's you actually want to work for) are going to be looking for some general understanding of algorithms and data structures. Also, writing 2 Project Euler programs in C doesn't really demonstrate that you can do actual work in C. I can probably do those examples in any programming language, but that doesn't really show or represent that I'm proficient in C. I suppose it "proves" that you can program but no one knows if you just copy and pasted that code. And I think nearly all companies now use some form of version control. What do you use for your sites? Strong Sauce fucked around with this message at 22:43 on Mar 8, 2012 |
# ? Mar 8, 2012 22:18 |
|
Strong Sauce posted:
I haven't done C since college, but I'd take one look at those and go "Great, he can write unreadable code with useless variable names" and pass. [edit] Sorry if that came off as mean! I'm just big on readable code with good, descriptive variable names. I get a kneejerk "gently caress this code" reaction any time I see variables named a, b, and c. New Yorp New Yorp fucked around with this message at 22:58 on Mar 8, 2012 |
# ? Mar 8, 2012 22:49 |
|
Strong Sauce posted:What kind of jobs are you applying to? Pretty much everything under the sun besides simple 'web design' titles when it comes to development. Web programmer, software engineer, software programmer, etc. While I have a decent amount of experience (especially on the web programming side, which I've been doing on a business/personal basis since 1998), I've been completely unable to actually land a job doing any of it. Strong Sauce posted:Edit: Thanks for taking the time to help me out. It looks like I should improve my algorithm knowledge (does anyone have any resources?), start using version control, and clean up my resume. Any other tips? Knyteguy fucked around with this message at 02:11 on Mar 9, 2012 |
# ? Mar 8, 2012 23:07 |
|
Ithaqua posted:I haven't done C since college, but I'd take one look at those and go "Great, he can write unreadable code with useless variable names" and pass. I can take mean if it's constructive. Project Euler was pretty much my reintroduction to C++, and I've since moved to much more readable code (thanks to a link here on better programming habits). Edit: Example of some c# code I've just written up: http://pastebin.com/w0Y0yfu7 Knyteguy fucked around with this message at 23:58 on Mar 8, 2012 |
# ? Mar 8, 2012 23:09 |
|
Knyteguy posted:I can take mean if it's constructive. Project Euler was pretty much my reintroduction to C++, and I've since moved to much more readable code (thanks to a link here on better programming habits). There are a lot of things wrong in general with your code and what you're actually trying to accomplish if the first line comment is actually what the program is suppose to do. There are also thing wrong with the code in general that isn't syntactically wrong but would not get you hired at a company where I was the engineer looking at your code. The biggest thing though is even if your program runs, its not returning the right result. Look at your loops and look at 'primeFactorNumber' and then look at the problem you're trying to solve. Then also look at ways that are causing your program to run way longer than it should. I have to goto a class and I'll be back in 2.5 hours, maybe someone else will tell you before but until then you should take a hard look at your code and try to figure out why it is wrong.
|
# ? Mar 9, 2012 03:22 |
|
Just a few things: Try to avoid negating names, this is more difficult to read than the alternative. code:
pre:!notAPrime Think long and hard about the logic in this statement. The last part of the statement is completely useless. i is initialized to 2 and is never decremented. code:
What do you mean by "next-generation" database solutions? WTF is an "advanced loop"?
|
# ? Mar 9, 2012 04:17 |
|
Knyteguy posted:I can take mean if it's constructive. Project Euler was pretty much my reintroduction to C++, and I've since moved to much more readable code (thanks to a link here on better programming habits). here is a version of what you did that is less stab-inducing code:
Bruegels Fuckbooks fucked around with this message at 05:31 on Mar 9, 2012 |
# ? Mar 9, 2012 05:03 |
|
You can assume the people reading your code are other developers who know the syntax and standard idioms of the language. Comments like these:code:
code:
|
# ? Mar 9, 2012 05:11 |
|
Knyteguy posted:Edit: Example of some c# code I've just written up: http://pastebin.com/w0Y0yfu7 I'm really loving // numberToWorkWith should equal 2 to save cycles. If you're going to loop up to 100000 the most important optimization is definitely starting at 2 so you only loop 99999 times to save cycles. So this post isn't completely useless: your comments are not very clear, for instance these comments code:
The most useful comment in your code is this one: code:
|
# ? Mar 9, 2012 05:16 |
|
Knyteguy posted:Thanks for taking the time to help me out. It looks like I should improve my algorithm knowledge (does anyone have any resources?), start using version control, and clean up my resume. Any other tips? http://forums.somethingawful.com/showthread.php?threadid=3471257
|
# ? Mar 9, 2012 05:58 |
|
Since we're on the topic of thinking you make useful comments when you don't, I've always thought that my comments were sufficient to make my code readable. Confirm/deny? A method from my last homework assignment: http://pastebin.com/17SrhJbe As for general programming style, I've been thinking that blank lines between sections of code separated by comments only made my code more spread out and difficult to read, so I've mostly started to eliminate those. I still keep my variable declarations separated from the rest of the code, though. Until recently I was skipping lines before all those places you see comments in the main section. I've also taken to assigning my variables as late as possible because I've noticed that initializing them unnecessarily upon declaration can sometimes result in hard-to-find bugs, and the only downside to late initialization seems to be that the code is more difficult read, but I think poor comments are the real culprit there. Thoughts? Safe and Secure! fucked around with this message at 06:13 on Mar 9, 2012 |
# ? Mar 9, 2012 06:11 |
|
Safe and Secure! posted:Since we're on the topic of thinking your make useful comments when you don't, I've always thought that my comments were sufficient to make my code readable. Confirm? A method from my last homework assignment: Your code still suffers from too many pointless comments. The best advice I've heard with comments is that they should describe greater purpose, not implementation details unless you are doing something "clever". Why does your code exist, what is the point of combining a bucket with its buddy. The code and variable names should speak for themselves for how you're doing what you're doing in most cases. Initialization done before a variable is needed is not a great idea, except possibly in the case of class variables. It definitely does not make code harder to read.
|
# ? Mar 9, 2012 06:19 |
|
You have a lot of comments. Their content seems fine to me, but you shouldn't have quite so many on fairly simple code. The declaration of variables and then their initialization looks weird to me. I guess it doesn't look that way to seasoned C programmers, but it just seems more lines of code for no benefit. Also, you're using "this" everywhere. Ensign Expendable fucked around with this message at 06:26 on Mar 9, 2012 |
# ? Mar 9, 2012 06:24 |
|
Safe and Secure! posted:Since we're on the topic of thinking you make useful comments when you don't, I've always thought that my comments were sufficient to make my code readable. Confirm/deny? Making good comments is hard. It's especially hard with homework assignments because you only look at the code for at most a couple weeks and then you never need to see it again. I only really started to understand the difference between a good comment and a bad comment when I started writing code that I had to come back to and edit a few months later. Reading your own code when you don't remember what it does, and seeing a bunch of comments you wrote that don't shed any light on the issue is really frustrating.
|
# ? Mar 9, 2012 06:28 |
|
I started out writing down a short list of steps to take to solve the problem (combining a bucket with its buddy). I then left each one in as a comment, because I figured that if it represents a separate "step" in my thinking, then it was probably worth explaining. Soquote:check to see if we can combine in my notebook became what you see there. Is there a better "system" to follow or is it more of an experience/feedback thing? I haven't worked on much code with other people, so I don't really know how others are going to look it. Also, I use "this" to make it obvious that I'm using a variable that belongs to the object, so that variables without "this" can be assumed to be local. I know that prefacing instance variable names with m, or m_ would work, but I disliked how those required me to hold the shift key right afterward to capitalize the first letter of the rest of the variable name, or to type the underscore. Typing out "this." is just more comfortable to me than hitting shift.
|
# ? Mar 9, 2012 06:36 |
|
Safe and Secure! posted:http://pastebin.com/17SrhJbe Here I made a new pastebin: http://pastebin.com/WBK6EYu4 Safe and Secure! posted:I started out writing down a short list of steps to take to solve the problem (combining a bucket with its buddy). I then left each one in as a comment, because I figured that if it represents a separate "step" in my thinking, then it was probably worth explaining. So in my notebook became what you see there. Is there a better "system" to follow or is it more of an experience/feedback thing? I haven't worked on much code with other people, so I don't really know how others are going to look it. Experienced programmers don't care about your thought process on a low level, we care more about the higher level thoughts. With good variable name selection and occasional comments the code becomes easier to read than explaining every step of the way. Don't use hungarian notation, use an IDE with syntax highlighting. Neither hungarian notation or excessive use of "this" is truly terrible though, more of a style choice. baquerd fucked around with this message at 06:38 on Mar 9, 2012 |
# ? Mar 9, 2012 06:36 |
|
Yeah, prefacing variables with their type looks much weirder to me than using "this".
|
# ? Mar 9, 2012 06:38 |
|
I see, so while I should stop putting comments before each chunk of low-level logic, separating them visually with a new line is also going to make it easier to read? As for the this/Hungarian/neither topic, I use Eclipse for Java and I didn't know it was an option to highlight instance variables differently from local variables. Also, I had it return if the bucket couldn't be combined instead of throw an exception because the method calling it only wants it to combine if possible and do nothing otherwise: code:
|
# ? Mar 9, 2012 06:53 |
|
oRenj9 posted:Just a few things: Interesting about the notAPrime vs prime. I will try not to use negated variable names in the future. The i != 0 part was from an earlier iteration of the code (which is why I really made i=2 instead of 0), I actually meant to take that out but kept forgetting. Re: resume - I suppose I was just trying a bit too hard there. The resume is actually about a month old so I will be going over it and correcting it per everyone's comments. Hopefully it will be enough to land me a (probably entry-level) job so I can use a resume writing service next time . E: I'm not sure why i would be decremented though. It's used as a number to factor the long number. Decrementing anywhere would just lead to repetitiveness. Please correct me if I'm wrong though. Nippashish posted:I'm really loving // numberToWorkWith should equal 2 to save cycles. If you're going to loop up to 100000 the most important optimization is definitely starting at 2 so you only loop 99999 times to save cycles. Thank you . This is actually the first input I've gotten on some of my code, and it's extremely helpful. For me it's kind of like how often we miss errors while proof reading our own work that others catch. Contra Duck posted:You can assume the people reading your code are other developers who know the syntax and standard idioms of the language. Comments like these: Thanks I'll remember this. I thought it was standard programming practice to add stuff like this . etcetera08 posted:http://forums.somethingawful.com/showthread.php?threadid=3471257 Thank you for this. I will be signing up. Once again I appreciate the help. You guys are awesome. I'm very eager to make a career out of this, and stuff like this will greatly help. Knyteguy fucked around with this message at 07:11 on Mar 9, 2012 |
# ? Mar 9, 2012 07:00 |
|
Safe and Secure! posted:I see, so while I should stop putting comments before each chunk of low-level logic, separating them visually with a new line is also going to make it easier to read? As for the this/Hungarian/neither topic, I use Eclipse for Java and I didn't know it was an option to highlight instance variables differently from local variables. Yes, that's the right idea. As you become more and more familiar with code, you will be able to read it practically like English if it's written well. Variable name selection is huge! For example, if we call the new key array "combinedKeys" in a method commented to combine buckets, it's instantly obvious what the purpose is. Some good commenting categories would be those that allow you to skip over blocks because they're doing something trivial (resetting bucket contents), explain complicated low-level logic (not present here), or explain higher-level purpose (method level comments). I haven't used Eclipse in forever, but I would be incredibly surprised if you couldn't highlight instance variables differently. Use new lines when they separate low level groups of logic or where it simply looks better. Experience will be a good guide, and there's no hard rules. As an aside, you should check to see if the combined bucket keys would overflow the new bucket's maximum keys. Also and in the same vein, unless you have a good reason to use a fixed int array, use an ArrayList<Integer>.
|
# ? Mar 9, 2012 07:03 |
|
I think I've got the rest, but why would you use ArrayList<Integer> here instead of a fixed array? Also, the canCombine() method checks, along with something else, whether the two bucket's combined keys will overflow the bucket into which they are combined. Should I have explained that in the comment before the check? Thank you all for taking the time to explain, by the way. Also, oRenj9 posted:You should be looking into Lucene. That way, you kill two birds with one stone. You'll get to work with a search engine and contribute to an OSS project. I have looked into Lucene but it seems way more complicated than anything I've worked with before and I wasn't sure how to begin to approach it. I guess going through the documentation and maybe writing a couple of programs that actually use it might be a good start? Thanks for the suggestion! Safe and Secure! fucked around with this message at 07:16 on Mar 9, 2012 |
# ? Mar 9, 2012 07:13 |
|
Knyteguy posted:http://www. thetordb.com This, combined with the fact that you've never used version control, tells me that you need to spend some time learning about the various tools and technologies out there. I'm not saying you have to hop on every bandwagon that comes along and learn the hottest new Ruby framework and NoSQL flavor of the day, but it really looks like you need to get out of your PHP/MySQL cave and learn what else is out there. Want to develop a website in PHP? Check out CodeIgniter or Symfony. Full-text search? Check out Lucene. Cookie-based login system? Yeah, just use your framework for that. Seriously, getting stuff like that right is hard, and there's no reason not to use existing solutions that have already been tested. I registered a few accounts all with the same password, and they all had the same PWTHETORDB value in the cookie. At 40 bytes it's probably SHA-1, but it looks like you're probably salting the passwords with a common salt. But that doesn't really matter, because I can keep trying account names by changing THETORDB in the cookie until I run across one that uses the same password as my original account, and now I'm logged in as them.
|
# ? Mar 9, 2012 08:12 |
|
Safe and Secure! posted:I think I've got the rest, but why would you use ArrayList<Integer> here instead of a fixed array? Also, the canCombine() method checks, along with something else, whether the two bucket's combined keys will overflow the bucket into which they are combined. Should I have explained that in the comment before the check? The canCombine() method actually looks good to me. We needn't know what it actually does, we can make pretty clear assumption from its nice and obvious name. I'd like to second what baquerd already said in that giving clear, descriptive, appopriate names to variables and methods is super, mega, ultra important and something that clearly separates good code from the bad. In fact choosing better names is one of the top three main processes in writing good code, beside removing duplication and keeping your tests passing. You wouldn't need all those comments (which in your original sample register mostly as line noise, tbh) if it was clear from the names of the variables and methods as for what they were for. Don't be afraid to give long and descriptive names to your variables. Don't think terseness would make your code look cool and professional, the effect is actually the opposite. (Using i, j, ... for loop iterators is good convention though). Good code is usually readable and understandable without comments. You might also be surprised how much easier you'd find bugs in your code if stuff was named better. If you can't think of a good name for a variable, use an extremely descriptive one, such as theThingThatCountsTheNumberOfKeysInBucket, until you can think of a better one that conveys the intent better. You can always safely rename the names of variables and methods when you can think of a better one. I don't know what the keystroke for the safe rename in Eclipse is because I don't use it, but I'm sure it's one of the first options in the Refactor menu, and it's one of the commands in an IDE you would be using the most. For how names in code ought to improve, see this picture. Don't be afraid to group related functionality into separate, well named methods, either. Instead of code:
code:
pigdog fucked around with this message at 10:11 on Mar 9, 2012 |
# ? Mar 9, 2012 09:59 |
|
pigdog posted:
God, yes. If I see a method longer than 15-20 lines of code, I start looking for where it's doing too much. The advantage of having smaller methods is that they're easier to unit test and debug, in addition to just plain being easier to isolate visually and read. If I'm in the middle of a 300 line method, looking for one specific issue that I know is with a piece of logic, it's way easier if the 280 lines of irrelevant code are off somewhere else and I can focus on the 20 problematic lines. As for variable names, we live in an amazing world of intellisense / code completion. I'd much rather see "bool canExecuteDeletionCommand = true;" than "bool del = true;". With code completion, it probably works out to the same number of keystrokes anyway New Yorp New Yorp fucked around with this message at 14:44 on Mar 9, 2012 |
# ? Mar 9, 2012 14:41 |
|
dancavallaro posted:This, combined with the fact that you've never used version control, tells me that you need to spend some time learning about the various tools and technologies out there. I'm not saying you have to hop on every bandwagon that comes along and learn the hottest new Ruby framework and NoSQL flavor of the day, but it really looks like you need to get out of your PHP/MySQL cave and learn what else is out there. Interesting, I had thought I covered most of the cookie security but hadn't even thought of a vulnerability like that... code:
I've heard of many of the things you've mentioned above (CodeIgniter, etc) but never really looked into them. I was thinking there would be more prestige in coding completely from scratch. Suppose I learn the tools above and create a useful new website using CodeIgniter and Lucene, would this help my career outlook at all? Are these tools an IDE like Visual Studio? Or is it more like Wordpress? Thanks for the help . Knyteguy fucked around with this message at 20:27 on Mar 9, 2012 |
# ? Mar 9, 2012 20:15 |
|
Everyone uses libraries. While writing something from scratch shows you know how it works, you should first demonstrate that you can read documentation and use other people's code.
|
# ? Mar 9, 2012 20:25 |
|
Knyteguy posted:Interesting, I had thought I covered most of the cookie security but hadn't even thought of a vulnerability like that... That's even worse than I thought; that means that I only need to find a username where the password matches just the first 4 characters(!!!!!) of mine in order to log in as them. Seriously, you should use a framework for stuff like this, there is no glory in reinventing cookie-based auth yourself, even if you get it right, which you won't. I'll give you some more comments in a bit.
|
# ? Mar 9, 2012 20:38 |
|
Ithaqua posted:God, yes. If I see a method longer than 15-20 lines of code, I start looking for where it's doing too much. I'm running into this problem in one of my applications, where there's a 30 line method, but 17 of the lines are controlling visual elements on the page, and there's a lot of "peekaboo" involved between methods. I should probably be combining the visual elements of the webform into their own method(s), yes? (or rewrite the whole thing as an MVC, but that's for the .NET thread) I want to get rid of stuff like this, right code:
aBagorn fucked around with this message at 21:18 on Mar 9, 2012 |
# ? Mar 9, 2012 21:12 |
|
aBagorn posted:I want to get rid of stuff like this, right The answer is probably "yes". MVC aside, can you think of a better name for SomeMethod() that would summarize what it is that running it would accomplish? If it would be something like CloseThisOneWindowAndHaveFunWithDataAndThenDisplaySomethingElse(), then that's one easy way to tell if and how you should break it down. A method should usually do one thing. It may be a complex thing, it create many objects and call many other methods, but intuitively, it should do what the name implies it would do.
|
# ? Mar 9, 2012 22:49 |
|
|
# ? Apr 28, 2024 22:42 |
|
dancavallaro posted:That's even worse than I thought; that means that I only need to find a username where the password matches just the first 4 characters(!!!!!) of mine in order to log in as them. Seriously, you should use a framework for stuff like this, there is no glory in reinventing cookie-based auth yourself, even if you get it right, which you won't. Hm so why is this so? Is there a name for this attack so I could do some research? I really like this kind of stuff. Thanks again.
|
# ? Mar 10, 2012 00:48 |