reading-notes

Class 42

Back to home page

Ethics in tech

The article I read about was: The code I’m still ashamed of

This author talks about his early career in the coding world in the early 2000s. To sum up the article, he had started coding very early on, and his dad got him a part time job when he was 15. He got little money, but great work experience. After awhile when he was in his 20s he got his first job at marketing firm in Toronto Canada makinf marketing websites for pharmacutical companys. On the serface it seemed like a good gig, getting good money and coding out some simple interactive websites. Hoowever, one of the websites he was making had a quiz that was under the serface very unethical. The website and quiz was targeted at younger women, and it would give them a quiz to help them find which treatment was right for them. But what was really going on is the quiz would always point to the same advertisement to a specific drug, no matter what the user put in (unless they said they had an allergy). The author describes how he even felt it was wrong when he wrote it but didnt want to question the company. He eventually learned that the drug had huge side effects of suicidal thoughts and depression. HEaring about this and even about a girl killing herself, he resigned a few days later. To close out the story, he talks about how he regrets the decisions he made when coding out the website, and he would change it if he could.

Its very important to remember you could potentially reach millions of people with your website, and if your advertising a product, it has to be truthful. Not just because of proper ethics, but it could cost the companys reputation. I think what he did was the right move, as I would not be able to work for a company knowing that I would be spreading a lie through my own work.

Pythonisms

Q. What are dunder methods in Python, and how do they allow for the customization of built-in behavior in classes? Provide an example of a common dunder method and its purpose.

Q. Explain the concept of an iterator in Python. How do you create a custom iterator using the iter() and next() methods, and why are they important for enabling iteration in a class?

Q. What is a generator in Python, and how does it differ from a regular function? Illustrate your answer with an example of a generator function using the ‘yield’ keyword.

Q. Define decorators in Python and explain their primary use case. How can you create and apply a custom decorator to a function or method? Provide a simple example to demonstrate this concept.

Bookmark and review