ARTS - Week 6
Long time no see, I am back lol
Algorithm: Leetcode274 H-Index
"""
Think geometrically. We are ploting histogram where:
- x-axis stands for papers
- y-axis stands for number of citation
If we sorting in descending order, h-index is the length of the largest square in the histagram
## Algorithm
- if citation[i] >= i, then paper 0 to i all have at least i+1 citations
h-index = max(i'), i' is the largest number that satisfy citation[i] >= i
Time: O(nlogn)
"""
def hIndex(self, citations: List[int]) -> int:
citations.sort(reverse=True)
h_index = 0
for i in range(len(citations)):
if citations[i] > i:
h_index = i + 1
return h_indexReview - Self Reflection on Career Path
There are tons of moments in my career life that I doubted my in many aspects heavily. Then recently I notice the document in Ref that ease my life:
Whether we are heading toward the long term career goal
Whether we acquire the key points when we accept the offer
How shall we handle the temporary frustration
With these 3 simple questions, it does heavily reduce my concern.
(which is actually just 4 years >< )
Ref
This is actually part of the content from 產品經理 Reflection 的技術 by Perter Su
Tips - dbt is case sensitive for model name
dbt is case sensitive for their model name when we use the internal jinja macros.
-- prerequisite: `daily_snapshot_table_kings` table exists
SELECT * FROM {{ ref(daily_snapshot_table_kings) }} -- work
SELECT * FROM {{ ref(daily_snapshot_table_KINGS) }} -- not workThen I found the related document:
Creating relations with quoted identifiers also makes those identifiers case sensitive. It's much more difficult to select from them. You can re-enable quoting for relations identifiers that are case sensitive, reserved words, or contain special characters, but we recommend you avoid this as much as possible.
On Snowflake, quoting is set to false by default.
Ref
Share - How I organize my work
First of all, I am utilizing a method called monotasking, which mainly contains several concepts:
Short List: Keep the top 5 important tasks
Collectors: Record the random ideas and sub-important tasks
Gonna skip the concepts behind (Weekly purpose; The monotasking session; The Panorama Session)
With simply short list and collectors, I could ensure myself focusing on the task with top priority, and prevent myself from disruption by the tasks with lower priority.
If you’re also interested in this methodology, you may check the reference.
Secondly, I make full use of slack features: Save for later; Reminder.
Remind myself read some message again after some task, so that I don’t lose context
Set the reminder for the messages with less importance but worth reading.(like some techniques)
Third, I create a public memo channel to record something to read later online. (e.g. interesting tech blog)
Last but not the least, keep a dev log to record what I have done to resolve an issue:
Remind myself of the context
Information is reusable
May help other colleagues(the channel is public)
Ref
The art of monotasking in Harvard Health
Monotasking for Productive Work Blocks by Angela Zoss


