Egret Breakthrough

The company I am volunteering for outside of work has been using a flat-file database I will call Gold Digger for fun and because it’s a play on the title of the software. Just within the past half hour I was able to export data from one of their main modules in Gold Digger as a CSV file and was able to import this into the PostgreSQL database, Egret. My strategy was to build a migration table in Egret that would match the column names in the CSV. Because the CSV is all text, trying to import “-80.50” into a numeric field just blows the frick up, so I decided I would make the migration table columns all text. I will have to explore more to find a quicker method to perform these migrations, but the next step will be to insert into the Inventory table a selection from the migration table and get fancy with the data format functions (currently unknown to me) in order to match the datatypes properly.

Three hours Tuesday night taught me some major differences between Oracle and PostgreSQL. I think I would struggle to be a DBA because I always have to know why, and so much about databases seems to be ad-hoc.  In Oracle, a user is typically a schema, but in Postgres users are now Roles (with login privileges). Which is really interesting, because you can also have multiple databases in one “database”, but the users are separate from those databases. It’s weird. Now, what’s going to be really fun is building the user functionality and learning how to establish encryption over an intranet. Well, I won’t worry about that yet. A journey of a thousand miles begins with a single step.


jQuery Revelations

A few posts ago I lamented how there are so many things you can do with Javascript/jQuery, but most of those things are inappropriate for modern websites or are otherwise useless. Then today it suddenly hit me that the primary use of such things as slideDown() or animate(), which I just learned, is for advertising. Duh! I get those all the time when I’m reading news articles. You hit a certain point in the page and suddenly a video slides down and wrecks your entire reading experience. You close it and it slides up. I also noticed that the practice site for the book I am reading uses slideDown() to add some flair to whenever I move to the next question.

Sometimes you really do just have to keep learning before it begins to make sense. I’m sure I will recognize other legitimate uses of jQuery as I continue learning.


“I…have made fire!”

By this I mean to say that I’ve connected to a Postgresql database with C# and printed some content to the console, marking the third time I have used the connected layer of ADO to retrieve database information.

You have to realize, at my last job, all of this was abstracted from us. ADO is the beast I’ve been learning on my own for the past several weeks. I took a guided, 200-page tour, and now I’ve been doing more hands-on, which is so important. Most tutorials use Sql Server, but last week I had some down time to connect to one of our development Oracle databases, and now I’ve connected to my Postgres database. So that’s the power of using interfaces to achieve similar functionality across providers.

To be fair, I’ve had to reference my C# book for each occasion, as I keep forgetting that damn DataReader object, but I’m pretty stoked I got this to work. It’s scary to think how much more there still is to learn about ADO and Entity Framework, which leads me to my next thought.

Entity Framework still confuses me. I was thinking about doing the Egret database code-first, but I’m so new to EF that my brain starts to freak out when I think about the database structure in C# code. I’ve done so much with SQL over the years, it just feels better. Not having had experience on the job to teach me which is better, I may just build out the rest of the database in Postgres for expediency and peace of mind, then pull in the classes from the database. Unbeknownst to me at the time, the original data I received for the database was not the complete copy, and I only received the complete copy last month, which changes everything in my models, but I am desperate for visible progress. I can’t take the tutorials anymore: it’s sink or swim now, and some good people are relying on me to swim.

This is probably the most study I ever done over these past 6 months. The pace feels painfully slow, but 700 pages of brute C# is not to be dismissed, and I’ve dramatically surpassed the knowledge I had last year. But I’m going to count this victory and call it a night. I’ll push onward tomorrow.

jQuery Adventures

I finally started to learn jQuery using a book titled “A Smarter Way to Learn jQuery”. It’s a very effective book, teaching in tiny two or three page chapters, hosting 20 practice exercises for each chapter online. I usually dislike practice problems and prefer to chew the meat and move on, but this latter strategy has resulted in some glaring gaps in my knowledge, and has meant the frequent rereading of chapters in books such as “C# 6.0 and the .NET 4.6 Framework”, which has been my buddy for learning C#. I can honestly say this new methodology is really effective.

jQuery is used closely with Bootstrap and is also the library I chose for Egret, given its prevalence and the fact that a Javascript library has been missing from my repertoire. I am about a quarter of the way through this book, but the practice questions follow the exact same format for each chapter, so the thought of doing 55 more of these is wearing me down. More importantly, there are a lot of bells and whistles, but that doesn’t mean these bells and whistles should ever be used (I’m reminded of the html <marquee> tag, not that my company’s internal IT website would EVER use that).  Unless you’re using Ajax, I can’t imaging paragraph text swaps or fade-ins being used in a professional environment. This has always been my greatest barrier to learning more Javascript: Everything is permissible, but not everything is beneficial. Books almost always focus on what is permissible. As a developer with an eye for design, I have a hard time seeing much value in most of the site behavior. If it looks good and it works, why would I ever need fades, scrolls, replacements, swaps? Ok, well now that I think of it, swapping a class for input validation might be handy, but that’s about it.

Well, that’s why you have to jump in. You can find the useful bits later, but you have to understand the technology first. I’m just excited I’ve been making so much progress through these books lately.