Tia’s log – 190531 :: JavaScript

Notes to self

  • Javascript is seriously pretty freaking awesome these days. I remember when it was all about cursor followings, no right clicks, and horrible password protection. Not too mention, no good for accessibility.

Angsts

  • Coworker told me learning how to use the google recaptcha in a project would take 30 hours. Oh, hun. It’s seriously a drop-in and minimal configure. This just reads as- I don’t want to do it because you suggested it and I want an even easier solution.

Passionates

  • I’m digging the debugger in the Firefox console. I mean, I’ve used it before, but I’m sure no where near what I’m doing now. Such improvement on the old days. Let’s get it.
  • Yep. I’m annoying. I’m the girl who will change all your deprecated CRAP HTML to standards (after ensuring it works and that the user base are using standards compliant devices). Oh, I’ll be spreading some lets, consts, et all ALL up in your JavaScript. I know most of the people I work with are old-heads, heck, I am too. But I see NO ONE wanting gotos. Let’s move forward.

Olio

  • So what’s your daily practice look like? I mean, if you are a programmer, you program. But how do you learn at work all the while working?
Some suggestions:
  • listen to programming podcasts
  • listen to and casually view LiveStream programmers and Youtube tech chats
  • Read a code review on a code review site
  • Follow some good blogs that’ll help you learn more. I recommend really only reading one. Save the rest somewhere like Pocket
  • Do a code exercise — best tip for this, don’t do it in your primary IDE. Do it somewhere that won’t give you all of the boilerplate and hints, but still keeps some niceties like color coding
  • Research a small but complicated topic in your language of choice. The best for this is looking int a specific method, function, or package and learning it inside out
  • Watch a video on coding practices
  • Watch a video that will make you more efficient in your tools
  • Blog, share
Rant

These are little things you can do during breaks at work, and still get everything done. I do want to say, I don’t care too much for all these latest tirades on people working at home and or being passionate about coding. I had someone tell me coding couldn’t be a hobby. This was an artist! You know, someone who constantly blurs the line between profession and hobby. Suffice to say, it can definitely be a hobby. It can also, definitely, just be your job. Do you. Like what you like. Is that too hard for some people? Know yourself. Know what you can take on. Know when to take breaks. Know when you need to shelf something for a few months to come back to it later. Outside of that, the sky is the limit.

Share

All the console functions for JS

Etc

Goooooo Raptors!

Tia’s log – 190529 :: mssql, sql, jQuery, WordPress

Please, for the love of goodness sake, if you are not the person working on an program/script, don’t assume it will be "easy". Your easy may be someone else’s headache. Also, please don’t query someone on some code that they wrote a million, bazillion years ago and expect an immediate answer. Heck, I barely remember what I did yesterday.

Side note, I’m submitting my first submission for documentation on of my favorite open source projects today. Wish me luck!

Notes to self:

  • JQuery is still pretty good. Don’t @ me.

Angsts:

  • Random SQL triggers are not my friend. WTH. Praise almighty goodness for "DISABLE TRIGGER" (Are you triggered? This is to create test data, no worries.)
  • Still don’t like MySQL stored procedures. 😦
  • I don’t care about writing documentation, but I’m not the best. I’ll mostly link you to resources based on what we are doing that I know will stay maintained. Or, if it is a list of tables/procs – I’ll tell you the prefix or schema. Just, for the love of goodness, don’t expect me to handhold you through eveyrthing or explain every basic concept. If you can’t take the initiative to do a little research, what good is my writing it down in a document going to do? Perhaps for others, but no one else has needed it… because, some of these things are CompSci 101 or even W3Schools level.
  • Meetings still suck and are still draining.
  • Renaming a database in MySQL still sucks. Hoorary, Percona!

Passionates:

  • I love VanillaJS so much. I’m always so happy to use it in my day-to-day although I primarily work on the backend. Hopefully soon I can begin the transition of our large codebases from jQuery to vanilla and Vue. Not sure how well Vue plays with a site that isn’t a SPA, but I suppose I’ll see.
  • One of my greatest joys is digging into someone elses code, figuring out how it works, updating it, and improving it. I’m just that good. (Typically, IRL, it’s more like breaking it, but, hey!, I know where it was brokah. Huzzah for tests.)

Olio:

  • One more note about documentation. I’ve always been one to keep so much in memory, simply because that’s how it was passed to me. I’ve seen the usefulness of documentating not just, or specifically, how things are done but: why, possible issues, and resources. Invaluable. I like one Twitch streamer I watch who puts his documentation in one note. It’s super nice that one. I’d even go as far to say that it is MUCH better than documenting on Google Docs or Evernote. That streamers name? No clue, atm.

Tia’s log – 190430 :: mysql

Notes to self:

  1. SHOW FULL TABLES WHERE TABLE_TYPE LIKE ‘VIEW’; – shows all views in the current mysql database. Add to that "IN dbname" after TABLES to specify which database. Adding the word FULL gives a new "table_type" column, which gives the type of table including a view or system table. No FULL such as just "SHOW TABLES" will list all in a database.
  2. CONCAT_WS has a seperator vs just CONCAT. Additionally, if anything is NULL in concat YOU ARE SCREWED AND THE WHOLE THING WILL BE NULL (as of today and MySQL folks). Otherwise, _WS allows nulls. They are skipped, in this case.
  3. Group_Concat, which groups values data together in a nice comma seperated string, has a default value of 1024. It can be changed at runitime by setting group_concat_max_len to a valid positive integrer. It is, however, constrained by max_allowed_packet.

Angsts:

  1. Shared hosting is no good. If I can’t create a proper stored procedure or view because you want me to use your web view and restrict those, we are not friends.
  2. MySQL isn’t as friendly for creating pivot tables compared to some of the other RDMS systems. So how do you? You group by a common ID (typically, ID) and then you get the max (probs value) or some other aggregation method of the records you want (probs name/field/etc.). How does this work? Know this: you group by an id, once there, you are pulling in the value that fits your aggregate. In my case, the max entry for that grouped id.
  3. Stored procedures in MySQL are still not one of my favorite things to write.
  4. ARGH jkljouoweur. All the good JSON functions are in MySQL 7+. Guess it is off to let the codebase do it properly.
  5. There is, currently, no "CREATE OR REPLACE PROCEDURE". MariaDB has it, but I’m on MySQL, so, oh well. Drop and recreate is the best way to go. There is an alter procedure, but according to the docs (@see https://dev.mysql.com/doc/refman/5.7/en/alter-procedure.html): "However, you cannot change the parameters or body of a stored procedure using this statement; to make such changes, you must drop and re-create the procedure using DROP PROCEDURE and CREATE PROCEDURE." HECK.

Passionates:

  1. SQL Fiddle is pretty great for sharing SQL.
  2. CREATE OR REPLACE for a SQL view is pretty nice.

Olio:

There is this little thingy to create Pivot tables in MySQL. I guess if you don’t want to write out the sql, this will help? mysqlpivottable