| Off Topic > Off Topic |
| Programming Megathread |
| << < (29/241) > >> |
| Headcrab Zombie:
--- Quote from: devildogelite on November 01, 2015, 06:34:00 PM ---Take a look at my hatchet job! --- End quote --- One major pet peeve is people using string datatypes when other, more strongly typed type are available. For example, using strings of 1s and 0s instead of byte arrays Once you do that: if ((inputOne == '1' && inputTwo == '0') || (inputOne == '0' && inputTwo == '1')) inputOne = '1'; else inputOne = '0'; can be simplified to use the existing bitwise xor operator: inputOne = inputOne ^ inputTwo; Also, return is a statement, not a function: return x;, not return(x); The latter may work but it looks odd |
| Ipquarx:
--- Quote from: devildogelite on November 01, 2015, 06:34:00 PM ---I have an S-DES assignment do for my crypto class tonight, I've been chugging away at it today without really going back to make sure I'm following the algorithm correctly. But I think it's right, I've checked all the parts of it as I went but never the final result. Take a look at my hatchet job! --- End quote --- You have a crypto class?! Lucky... |
| devildogelite:
--- Quote from: Headcrab Zombie on November 01, 2015, 06:43:12 PM ---One major pet peeve is people using string datatypes when other, more strongly typed type are available. For example, using strings of 1s and 0s instead of byte arrays --- End quote --- I know what I'm doing is probably the worst way to go about it, but I'm gonna be honest and say I don't have a great grasp on how to do byte arrays. I'm pretty confident it would of actually been more straight forward to handle it as bytes since that's how it's actually supposed to work. But like I said, it's a hatchet job --- Quote from: Ipquarx on November 01, 2015, 06:43:31 PM ---You have a crypto class?! Lucky... --- End quote --- It's the only class involving cryptology like that which is weird, since I'm getting a degree in Computer Security. Most of the other Comp Sec specific classes are in the realm of IT and network management which blows since I wanna do software engineering. |
| Foxscotch:
--- Quote from: Kochieboy on November 01, 2015, 01:36:17 PM ---Because of a lack of features and limitations of structured programming --- End quote --- do you mean functional? that's my guess. I don't like functional programming |
| Ipquarx:
--- Quote from: devildogelite on November 01, 2015, 06:47:22 PM ---It's the only class involving cryptology like that which is weird, since I'm getting a degree in Computer Security. Most of the other Comp Sec specific classes are in the realm of IT and network management which blows since I wanna do software engineering. --- End quote --- I don't even know if my university has a course on cryptography, there is one called "Computer Security" but that's all I could find. "Computer security and information management. This course will examine state-of-the-art knowledge about the issues relevant to data and computer security." |
| Navigation |
| Message Index |
| Next page |
| Previous page |