spaghetti-code

Best practices for refactoring classic ASP?

I've got to do some significant development in a large, old, spaghetti-ridden ASP system. I've been away from ASP for a long time, focusing my energies on Rails development. One basic step I've taken is to refactor pages into subs and functions with meaningful names, so that at least it's easy to understand @ the top of the file what's ...

Eval scripts in server side control property

how do i implement an eval script in a sever side control? eg. <a runat="server" href="?id=<%= Eval("Id") %>">hello world</a> ...

Best way to get rid of hungarian notation?

Let's say you've inherited a C# codebase that uses one class with 200 static methods to provide core functionality (such as database lookups). Of the many nightmares in that class, there's copious use of Hungarian notation (the bad kind). Would you refactor the variable names to remove the Hungarian notation, or would you leave them alo...

Is there a way to avoid spaghetti code over the years?

I've had several programming jobs. Each one with 20-50 developers, project going on for 3-5 years. Every time it's the same. Some programmers are bright, some are average. Everyone has their CS degree, everyone read design patterns. Intentions are good, people are trying hard to write good code but still after a couple of years the cod...

ASP.NET MVC reminds me of old Classic ASP spaghetti code...

I just went through some MVC tutorials after checking this site out for a while. Is it just me, or does MVC View pages brinig back HORRIBLE flashbacks of Classic ASP spaghetti code with all the jumping in and out of HTML and ASP.NET with yellow delimiters everywhere making it impossible to read? What ever happened to the importance of ...

How bad is this code?

I have inherited an online quiz application written in C# with these lines of code all over the place. So how bad is this code? What are the potential issues I could run into? How could I improve it? The code: strTestPasses += "<tr valign=\"top\"><td><b>Subject</b></td><td>" + ((Hashtable)((ArrayList)((Hashtable)MultipleTestPasses...

How to refactor rapidly evolving code?

I have some research code that's a real rat's nest, with code duplication everywhere, and clearly needs to be refactored. However, the code base is evolving as I come up with new variations on the theme and fit them into the codebase. The reason I've put off refactoring so long is because I feel like the minute I spend a few days comin...

Definition of spaghetti php?

Hey, I've seen "spaghetti" thrown about a lot and I just want a clear explanation on what is spaghetti code and what isn't. Just because I'd rather not be doing it. References in PHP would help as that is my language of choice. ...

Unravelling Assembly Language Spaghetti Code

I've inherited a 10K-line program written in 8051 assembly language that requires some changes. Unfortunately it's written in the finest traditions of spaghetti code. The program--written as a single file--is a maze of CALL and LJMP statements (about 1200 total), with subroutines having multiple entry and/or exit points, if they can be i...

Inline Scripting in Asp.net

Hi, I wanna learn advanced and basic things about Asp.net inline scripting like <img src="<%= Page.ResolveUrl("~")%>Images/Logo.gif"/> or <asp:Label ID="lblDesc" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Description")%>'></asp:Label> and so on... and like what's the difference between <% %> and <%# %> and such...

Tools to find included headers which are unused?

I know PC-Lint can tell you about headers which are included but not used. Are there any other tools that can do this, preferably on linux? We have a large codebase that through the last 15 years has seen plenty of functionality move around, but rarely do the leftover #include directives get removed when functionality moves from one im...

Why is spaghetti programming the most superior form of programming?

When you have a ignorant boss who doesn't know how to code or don't know anything about Object-Orientation then ditching out spaghetti is the best form of coding. Or is it? What to do? ...

Long-term learning for a "self-made" PHP developer

As some of us have created their public site without an academic background, I ask this question mostly to professionals: Enhance oneself : Non professional may encounter a barrier: it's easy to learn the basics (vars, loops, basic sql manipulation), but there are no "long term" tutorials, which really gives a deep knowledge. I know t...

Tips for coding using hostile tools?

Hi all, I am developing an application using the wrong tools. I don't wish to get into the rights or wrongs of this - the platform has been blessed as Strategic and nothing is going to change that now. But I'm hoping somebody can give me some tips on how to make the best of the situation. We use a server-side language, let's call it X,...