DEV Community

Cover image for March 3rd, 2022: What did you learn this week?
Nick Taylor
Nick Taylor Subscriber

Posted on

March 3rd, 2022: What did you learn this week?

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

![Information flowing through your brain](https://media.giphy.com/media/qKltgF7Aw515K/giphy.gif)

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

#todayilearned

Summarize a concept that is new to you.

<!-6-
And remember, if something you learned was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿
![Someone feeling like "Yaaas!"](https://media.giphy.com/media/zBhZiVNNQjfTG/giphy.gif)

-->

Top comments (41)

Collapse
 
grahamthedev profile image
GrahamTheDev

Twitter does not give you a way to protect people who have photosensitivity conditions (such as epilepsy).

I made a video with a load of flashing images, added the "sensitive" flag (which sadly destroyed my engagement) as per the great advice from @savvasstephnds and found out the video still plays and you can still see the flashes through the overlay, so that was pointless! 🤦‍♂️

I then found our that if your captions file (SRT file) has a start time that is before the previous captions end time you get a super helpful "your media could not be uploaded" message instead of something meaningful.

I think, in essence, I learned that I am rubbish at Video on social media, Twitter's accessibility is pretty meh for video, and I should leave video to the pros! 🤣

Collapse
 
optimisedu profile image
optimisedu

As an epileptic I want to thank you for this comment. Around one in 3000 people have uncontrolled epilepsy, many unknown. Only ten percent of epileptics are photosensitive but I got involved in development after my diagnosis - pretty severe but non photosensitive, certain frequencies just don't agree with me.

There is a huge problem with sloppy accessibility on the web, people are slowly catching on 👍, the more "a11y" is discussed the more people consider the tradeoff between acessability and performance.

Collapse
 
grahamthedev profile image
GrahamTheDev

I try…today as you can tell I was not very successful but I do try at least lol! A11y is a Massive and overlooked issue, I just try and do my part! ❤️

Thread Thread
 
optimisedu profile image
optimisedu • Edited

Yep even the term A11y isn't all that accessable (kinda the point but I can't help but feel the project is trying to be too clever. Different screen readers will read it differently).

Thing is semantic readability is important for teamwork if nothing else and I have met people who get half way through projects not knowing the meaning of an acronym because of imposter syndrome. "What is a SERP [search engine result page]"

Thread Thread
 
grahamthedev profile image
GrahamTheDev

Not to self promote (but I am lol), the "a11y" numeronym thing I wrote about that one, as it is one of the things that I totally agree needs rethinking / some thought in its use. I use it when others use the term if that is what they prefer but I will always start at "accessibility" and then move towards a11y if appropriate!

I also have a very "inappropriate" website "ultimatemotherf**kingwebsite.com" where I cover abbreviations and acronyms in my normal heavy-handed way 🤣 (if you don't mind gratuitous swearing you might enjoy that site! If you dislike swearing...yeah, don't go to that site!)

Basically, it is a very long winded and self-promotional way of saying "I agree with you 100%!" 😋

I noticed you just started becoming active here, I hope to see you pop up in the comments more often so we can discuss accessibility more, there are not enough of us fighting the good fight on this! ❤

Collapse
 
nickytonline profile image
Nick Taylor

Loki holding KFC

Collapse
 
grahamthedev profile image
GrahamTheDev

🤣

Collapse
 
savvasstephnds profile image
Savvas Stephanides

You would've avoided this whole story if you just didn't put flashes in your video to begin with 😅

Collapse
 
grahamthedev profile image
GrahamTheDev

Haha, very true! 🤣

Collapse
 
janmpeterka profile image
Jan Peterka

Not yet learned, but I'm trying to add some FE testing with Cypress to my Flask app.
I'm getting stuck a lot, as I didn't use npm before, and I'm not really undestanding GitHub Action workflows (where I want my tests to run).
This is one of these moment where 10min chat with someone who knows things would save me hours of frustration, and hours of refactoring later.

however, I made the tests run in local easily, and I love how I can test my app interactively, so looking forward to time when it will be integrated and I will feel much safer about changing my code.

Collapse
 
ktxxt profile image
Darko Riđić

Jan, you can chat with me if you still feel stuck with npm and cypress?

Collapse
 
janmpeterka profile image
Jan Peterka

Thanks for your kind offer!

Yeah, I'm still sort of stuck, on multiple levels. Basically, I'm unsure how the whole testing should be build around my app. More specifically:

1) I have unit tests in pytest, which uses some fixtures to set right database.
How do I somewhat integrate these two testing environments? Or how do I even think about them?

1b) Whats best practice -> recreating database data before every test?

2) It seems like I need to package.json on root of my app. however, in flask apps, I need to have normal js packages in /static folder to be usable (as i'm not using webpacker or something like that). so, i need to have two separate nmp projects inside my app? or I'm missing something?

3) I tried some way to create testing environment in Github Action, but I'm running into problems with pipenv/flask not working with correct env variables (thus not creating database). but thats sort of different issue.

Thanks for any pointers :)

Thread Thread
 
ktxxt profile image
Darko Riđić

2) If you want to keep inside one repository, you can create a directory just for Cypress inside. Inside that directory you can have a package.json and act like its a separate repo(or actually separate it to another repo).
Here is my cypress-template project with already split environments(dev, staging, prod)

You can definitely setup Github actions for any above mentioned structure.

1) When a commit occurs I would run(on both production and test/staging):

  • Lint
  • Unit tests
  • App build
  • e2e(cypress) test

Additionally, I would set up the project to Lint and unit test locally on every change before even commiting/pushing.

1b) Sure.

Thread Thread
 
ktxxt profile image
Darko Riđić

3) I do not have any experience with Github Actions, sorry :/

Thread Thread
 
janmpeterka profile image
Jan Peterka

I managed to make it working for now. It's for sure not the greatest, but I will hopefully improve it later, with more tests and so.

Thank you for your help and support!

Collapse
 
nickytonline profile image
Nick Taylor

BB-8 giving a thumbs up

Collapse
 
jonaspetri profile image
Jonas Petri

I learned yesterday that you can make videos using just code, which is awesome!

Collapse
 
nickytonline profile image
Nick Taylor

Croc mascot nodding

Collapse
 
dumboprogrammer profile image
Tawhid

from Fireship

Collapse
 
atulcodex profile image
🚩 Atul Prajapati 🇮🇳

from youtube?

Collapse
 
jonaspetri profile image
Jonas Petri

Yep!

Collapse
 
mtfoley profile image
Matthew Foley

1st week in 1st job in tech, so yeah, A LOT 😵‍💫

Collapse
 
nickytonline profile image
Nick Taylor

Gym teacher from Glee saying amazing!

Collapse
 
dumboprogrammer profile image
Tawhid

Godot and GDscript.
Now I can make some blogs on the Godot game engine!

Collapse
 
nickytonline profile image
Nick Taylor

Stephen Colbert saying Awesome Sauce

Collapse
 
cmgustin profile image
Chris Gustin

If you have an HTML5 “search” input, the “search” event will be fired if the user presses “Enter”, clicks the little “X” that clears the search box, and optionally if you’ve added the “incremental” attribute, it will fire when the user stops typing for a second.

Collapse
 
nickytonline profile image
Nick Taylor

Bobby Moynahan character from SNL saying awesome!

Collapse
 
mrsharm profile image
Mukund Raghav Sharma (Moko)

Late but here it is; my goal is to do one of these for every week of this year:

  1. Figured out how to work .NET Interactive Notebooks and currently building a framework around it.
  2. Check CPU Inclusion for all processes in an ETW trace to ensure there is no CPU starvation.
  3. Understanding the difference between workload imbalance and thread starvation i.e. affinitized threads will have to work until all work is over or wait for the scheduler to schedule the work.
  4. Difference between allocated and committed memory in the context of segments.
  5. .NET 7 features pertinent to GC.
  6. GC deep dive..
Collapse
 
nickytonline profile image
Nick Taylor

Kirk and Bones nodding to each other in Star Trek

Collapse
 
quality_pre profile image
Adam Preece • Edited

I developed further skills in node.js/express and a bit of mongo along with new words such as middleware! Also used jest for the first time and wrote some tests.

I revisited the reduce function on javascript ( I even wrote 2 articles on here to help me and others!)

And a little bit more python for fun!

Collapse
 
nickytonline profile image
Nick Taylor

Nice!

Nice

Collapse
 
arunkc profile image
Arun K C

Participating in Web3con Hackathon bootstrapped by developerDAO 🤩

Collapse
 
nickytonline profile image
Nick Taylor

Nice!

A kangaroo playing an electric guitar

Collapse
 
samuelojes profile image
DGAME

Completed the Git Apprentice Book by raywenderlich.

Collapse
 
nickytonline profile image
Nick Taylor

Man with American flag draping over him saying Good job!