Count(*) is unsafe

SELECT COUNT(*) INTO var WHERE condition;

IF var > 0 THEN
SELECT NEEDED_FIELD INTO otherVar WHERE condition;

In PLSQL method with count(*) is unsafe in above code. If another session deletes the row that met the condition after the line with the count(*), and before the line with the select ... into, the code will throw an exception that will not get handled.

Use the below insted,

SELECT NEEDED_FIELD INTO var WHERE condition;
EXCEPTION
WHEN NO_DATA_FOUND

Stack Overflow

Set Define OFF

The SET DEFINE command changes the prefix character used to mark substitution variables. You can use SET DEFINE to turn variable substitution off.

SET DEF[INE] {OFF | ON | prefix_char}

Define is a SQL*Plus client variable. It is NOT a database level setting.

When you start SQL*Plus, variable substitution will be on by default, and the default prefix character is an ampersand. If you are running a script that uses ampersands in text strings, you may want to change the prefix character to something else. If your script doesn’t use substitution variables, you may find it easiest to turn the feature off.

Oreilly

Brag document

Prepare a Brag document for the future self.

The brag document is like a reflection to the past. It will help to show what are your projects, how did you done it, what you learned, you goals and collabrations etc.

Julia
Github ReadME

Best practices for writing code comments

1: Comments should not duplicate the code.
2: Good comments do not excuse unclear code.
3: If you can’t write a clear comment, there may be a problem with the code.
4: Comments should dispel confusion, not cause it.
5: Explain unidiomatic code in comments.
6: Provide links to the original source of copied code.
7: Include links to external references where they will be most helpful.
8: Add comments when fixing bugs.
9: Use comments to mark incomplete implementations.

Stack Overflow Blog

Learn in Public

Learning in public is fastest way to build your expertise, network, and second brain. It will also attract luck.

How?

  • Write blogs , tutorials and cheat sheets.
  • Speak at meetups and conferences.
  • Ask and answer things on Stack Overflow or Reddit. Avoid the walled gardens like Slack and Discord, they’re not public.
  • Make YouTube videos or Twitch streams.
  • Start a newsletter.
  • Draw cartoons.

Oh you think you’re done? Don’t stop there:

  • Enjoyed a coding video? Reach out to the speaker/instructor and thank them, and ask questions.
  • Make PR’s to libraries you use.
  • Make your own libraries no one will ever use.
  • Clone stuff you like, from scratch, to see how they work.
  • Teach workshops.
  • Go to conferences and summarize what you learned.

People think you suck? Good. You agree. Ask them to explain, in detail, why you suck.

At some point you’ll get some support behind you. People notice genuine learners. They’ll want to help you. Don’t tell them, but they just became your mentors.

Eventually you run out of mentors, and just solve things on your own. You’re still putting out content though. You see how this works?

Learn in public.

swyx
Josh Branchaud
Aaron Francis