Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Can you practice Agile as a team of one?

 
Ranch Hand
Posts: 124
4
MySQL Database Clojure Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My Background: Three years ago, at the age of 51, I changed careers. I have a BFA in studio art and I went back to school and obtained a Digital Design Certificate from a local university. Prior to this I was a Field Service Tech working on industrial generator sets for Caterpillar and Cummins. That job was a mix of physical labor and digital know-how. I can typically fix anything. So, three years ago I got this job working for a company that is a subcontractor to a very large chip manufacturer here in Oregon. We maintain their global web presence. So, on one hand, my work environment is very cutting edge, very silicon valley, very high-tech. On the other hand, since I don't work directly for this high tech company I'm kind of just a warm body. And also, since I don't work directly for this big, global chip company I really don't have access to their developers and I am not part of a development team. In the three years I have been there I have been able to obtain the title of "Tech Lead" because I am willing to work outside of my comfort zone, and I have a real interest in code (especially Java), and I don't miss deadlines. But still, I work in this weird vacuum where no one knows more about what I am doing than me, but I don't exactly know what I am doing or exactly what process to follow. There is no mentorship, and sadly, even after three years in this environment I feel like I'm still not ready to move on to a real developer role in a real company that would value someone that gets the work done.

My Problem: I recently inherited a SQL database, some backend VB code that acts on that database, and an old Java program (Java 5) that imports the raw data into the data base and runs queries on it. The java program is broken. The person I inherited this from did not maintain it, or broke it, and resorted to manually importing raw data into the database and manually running queries on it. The VB portion of this mess still works and runs a portal that creates output tables and charts based on the raw data and other fixed tables. To make things worse, a third party vendor was asked to create a similar tool and each week we post our results and of course they are never perfectly in sync. This third party vendor supplies the raw data (from a registration application that they created), and since the code I inherited had not been maintained, someone at the large chip company asked them to replicate this old tool that I am responsible for because they had either lost faith in it, or had been told that it was broken and could not be fixed.

So, with virtually no help, no training, just reading past documents, I figured out basically how all of this works and I am able to produce numbers each week. But, my goal is to get the Java code working again and to make the whole program dependable and valuable once again. Do you have any advice? I am pretty intimidated by the vastness of the SQL tables, views, store procedures that make this work but at the same time I also know that a lot of this stuff already works. I am curious why the java program stopped working (maybe it was dependent on a library that is no longer supported... who knows) but from my point of view, I see this mess as possibly the best thing that could have happened to me. I get to fix something BIG that is broken, and right now I don't think anyone expects me to succeed, and no one is there to help. So imagine if you could work solo in this environment fixing this stuff, refactoring code (knowing that if you did screw up it could be the last thing you do there...) what would you do. What would be some of the basic things you would do to make sure you weren't just a mediocre hack, but actually were a caring, thoughtful developer that had something to prove. Also, how would document your process so that when it was all done you would have something to show your next prospective employer?

If you have read this far, thanks for taking the time. I know you too are busy. The opinions here matter to me and I have an opportunity to finally prove myself as a developer. Any advice you can give is welcome.

Thanks
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow - you're certainly facing a challenge there!

I'm an old database application developer (mostly with Oracle databases), and I've had to deal with undocumented legacy systems in the past, so my instinctive approach is to Follow The Data.

  • Start by looking at the tables, primary keys and foreign key constraints (don't worry so much about all the other fields just now) as this will give you an idea for how stuff hangs together.
  • Just draw boxes (for tables) and lines (for FK relationships) on a big sheet of paper so you can annotate them as you find out more. There are various notations for the relationships, but I prefer the "crows-foot" where the "foot" is at the "many" end of a 1:many relationship. The "many" end is where the FK is defined, and the crow's foot means you can see instantly which end is the child (many) table.
  • Depending on your database, it's possible that you might be able to find some tool that will reverse engineer a data model from the database itself, but if not, you'll need to do it the old-fashioned way. Your database should have some kind of database catalogue - the list of tables, keys etc, and you can use this information to work out how the various tables fit together.
  • One trick is to start with a table that does not have any foreign key constraints against other tables i.e. it is not a child of any other tables, which means it will be at the top of a local hierarchy, so you can start working your way down the hierarchy by looking for tables that have FKs against this table, and so on.
  • Or pick a table where you have a good understanding of what it contains e.g. a Customers table, and work through the hierarchy from there.
  • Tables with no relationships at all may simply be reference data - lookup codes etc - where nobody ever bothered to implement the FK constraints, or they may be transactional business data (e.g. orders) that could be a source of data integrity problems e.g. an Order where the Customer does not exist.
  • Also look at any working code for loading/creating data, as this will hopefully tell you something about what data gets put where in your database. For example, if you're loading customer data, you would expect to load the customer record before you load their order information, so this kind of thing should be reflected in the code.
  • Identify a top-level function e.g. create a new Customer or Product, and follow the code and the data by hand to see how the Customer/Product gets created, which tables are populated and when.

  • I know this sounds like a lot of work - I've had to do this myself on many occasions - but the database is actually a key source of information about what your application is doing. The application will be doing a lot of basic CRUD (create/read/update/delete) operations on this model, according to various business rules, so by revealing the data model, you will learn a lot about what the code is doing, even if the code is written in obsolete languages or full of bugs. And many programmers are afraid of databases, so their code may not always clearly express what is really going on. The data model is often a more reliable source of information, and by understanding the underlying data structures, you will also be better placed to re-factor/re-implement the programs in a logical manner in due course.
     
    Blake Edward
    Ranch Hand
    Posts: 124
    4
    MySQL Database Clojure Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks for the great answer. I spent most of the day digging through archives and I found a hierarchy. It was about six years old, but as I started checking it it looked to be mostly correct. It was one of those days where you keep having to remind yourself that you are a professional and you have a job to do. I can honestly say that I started fixing things today.
     
    Blake Edward
    Ranch Hand
    Posts: 124
    4
    MySQL Database Clojure Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    When I left work Thursday I had the old Java program working. I am lucky that the original developer and the subsequent developer actually created a well designed program that I can follow. This is exciting!
     
    chris webster
    Bartender
    Posts: 2407
    36
    Scala Python Oracle Postgres Database Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Glad to hear you're making progress! Maybe now would be a good time to explore test-driven development by implementing proper tests for your Java code so it's easier to maintain in future?
     
    Greenhorn
    Posts: 18
    Mac Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Blake Edward wrote:When I left work Thursday I had the old Java program working.


    Blake, how is the work on your project going? Are you planning to create a new and improved version of the old program?
     
    Blake Edward
    Ranch Hand
    Posts: 124
    4
    MySQL Database Clojure Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    That project is kind of on the back burner until the stakeholder deems it important enough and there is budget money for it. However, I have another project that is a potential Java (JSP, Tomcat, FX) and database setup where I get to build an application from scratch. Like I said above... I just say yes, figure it out and get it done. This particular job has the potential to be a portfolio piece. I'm excited and still trying to figure out exactly how I am going to do it. I met with the stakeholder's rep last week and so far everything is a go. They want it done by early January. We'll see.
     
    You're not going crazy. You're going sane in a crazy word. Find comfort in this tiny ad:
    the value of filler advertising in 2021
    https://coderanch.com/t/730886/filler-advertising
    reply
      Bookmark Topic Watch Topic
    • New Topic