User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Stupid Software Engineering & Design Decisions Page 1 2 3 4 5 [6], Prev  
FroshKiller
All American
50476 Posts
user info
edit post

We have a class for building HTML forms so you don't have to write HTML. It's largely undocumented, which is annoying. I was interested in using it, though, and noticed two public subroutines that seemed to be related to adding instances of our control types to the form. Here are their signatures:

Public Sub AddControl(Label As OurCustomLabelClass, Control As OurBaseControlClass)
Public Sub AddInteriorControl(Control As OurBaseControlClass)


I was interested in adding some checkboxes to the form. Our custom checkbox class renders its own label element. So I did what I thought was the natural, sane thing and opted for the subroutine that didn't have a required parameter of the label type.

The form did not render with any of my checkboxes. When I stepped through the code, I saw that they definitely got instantiated, and the calls to the subroutine definitely ran without exceptions.

I spent about 30 minutes troubleshooting this fucking thing until I finally searched the code base for another instance of someone adding a checkbox to a form through this builder. Care to guess what they did?

They called AddControl and passed Nothing for the Label parameter.

[Edited on April 24, 2017 at 12:53 PM. Reason : Peace, we outta here.]

4/24/2017 12:53:45 PM

aaronburro
Sup, B
51478 Posts
user info
edit post

Yeah, in a case like that, I would opt for AddControl first, based solely on the strange name of AddInteriorControl. Undocumented code is the best.

4/27/2017 12:34:22 AM

FroshKiller
All American
50476 Posts
user info
edit post

I understand why this is, but I'm annoyed as shit that getting the weekday from VB's DatePart function returns a value that doesn't naturally line up with .NET's DayOfWeek enum.

5/9/2017 7:56:43 AM

CaelNCSU
All American
6049 Posts
user info
edit post

Feature: Really important switch in the UI for turning on and off live programming.

1) Create web app for button to toggle live events on/off
2) Web app makes post request to 2nd web app
3) Web app #2 puts message on a Queue
4) Consumer of queue picks up the message and updates the database.
5) Web app #3 displays results in the UI to the end user.

No tests around any of the individual pieces or the system as a whole, so it breaks, constantly and no one knows why.

5/11/2017 7:32:46 PM

JeffreyBSG
All American
10110 Posts
user info
edit post

OLD remote environment was a nice pseudo-desktop in which you could edit your code in GEDIT and save it with CTRL-S

NEW remote environment is a cocksucking folder-navigation system with this dickless web-browser text window, in which you have to click the SAVE button to save anything

really fucking annoying to have to click a button with your mouse every time you want to save

5/11/2017 10:29:47 PM

FroshKiller
All American
50476 Posts
user info
edit post

Someone who should've known better checked some garbage code for generating a spreadsheet that he found on some damn message board into the common application framework, and other people have already started using it, so now we're chained to the goddamn thing.

5/26/2017 1:42:10 PM

FroshKiller
All American
50476 Posts
user info
edit post

A concise illustration of everything wrong with this codebase:

If bSendPhotos = -1 Or bSendPhotos = 1 Or bSendPhotos = 2 Then

6/14/2017 7:53:16 AM

smoothcrim
Universal Magnetic!
18013 Posts
user info
edit post

^^ you sure the stupid decision isn't the code review process?

6/14/2017 9:19:20 AM

FroshKiller
All American
50476 Posts
user info
edit post

That would be the larger problem, yes.

6/14/2017 9:44:09 AM

 Message Boards » Tech Talk » Stupid Software Engineering & Design Decisions Page 1 2 3 4 5 [6], Prev  
go to top | |
Admin Options : move topic | lock topic

© 2017 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.37 - our disclaimer.