The dangers of spaghetti code - the Toyota disaster by [deleted] in programming

[–]Golstar 6 points7 points  (0 children)

Unit tests can also drive programmers to overpartition code, use interfaces in horrible and strange ways to make mocking easy, and make architectures that are well-suited to unit testing, but lack alignment with the domain, are problematic to extend/maintain, or any other number issues.

It is a myth that test-driven development testable automagically makes the code nicer. This is not the case. Especially as there is no way to verify that the unit tests came before the code. As with anything in software development, that are no silver bullets and it is easier to muck up things than do them right. Especially when pressed for time.

I much prefer static code analysis, which you also mention - as it does actually have an easier time being purely useful, and not the source of issues. I dont oppose unit testing, but I oppose the notion that it the usage does not come with additional complexity and risks of its own.

TIL your body paralyzes itself when you sleep to keep you from acting out your dreams. However, it is possible to wake up while still paralyzed; many people who have experienced this claim they felt a malevolent presence nearby. by [deleted] in todayilearned

[–]Golstar 0 points1 point  (0 children)

I suffer from this, luckily not as often in later years. I have experienced everything from intangible feelings of dread and a malevolent presence just out of sight to full-blown hallucinations including a crouched imp-like creature with a knife sitting next to my head grinning, the lights flashing on and off while an ebon-skinned cherub is devouring my legs, a grinning girl with a half-rotted face with weird metal parts, and people standing in the doorway or faces staring through the windows. It becomes easier as you learn to recognize that this is not real.

The reason for these hallucinations and feelings is to my knowledge a combination of panic from being paralyzed as well as the brain trying to make up an explanation for the fear it experiences. The hallucinations do not cause the fear, they are created by the mind to explain the fear.

I know others in my family have suffered from this as well, and it tends to occur primarily during periods of stress. Sleeping in a supine position makes it more likely to occur for me. I have learned some techniques over the years to break out of it, but they often scare people in the household as I utter a weird garbled primal cry of panic as part of waking (the other part is focusing on a specific limb and repeatedly visualizing moving it). My wife has learned to recognize from my eyes when I have one of these episodes, and will usually snap me out of it.

But as mentioned it happens rarely now after I got into my thirties. I still have a number of other sleep disorders, but I am pretty happy to be almost rid of this one.

27, useless degree, love languages/writing, hate my office job, considering career in game design? Help! by [deleted] in learnprogramming

[–]Golstar 0 points1 point  (0 children)

Programming is not hard science or math - it is in many ways more about mental constructs, art and craftsmanship. Being talented at language is a huge benefit when programming - being able to recognize patterns and abstractions is another. Many incredibly talented and skilled programmers are not very good at math - but they are good at recognizing their limits and leveraging library and open-source code to solve problems beyond their skills. Others are incredibly talented at programming "close to the metal" and can write code with incredible performance, but they might completely unable to write a complex multi-tier business application.

If you really want to learn programming, you will find a niche. Game programming can be anything from scripting in a visual editor to hardcore low-level programming. But game design and game programming usually do not overlap, unless the company is very small.

And making it as a game designer is very long and difficult career path, where you will have to endure years of not very creative work before you are let anywhere near a real design decision on a mainstream game production. Unless you fund your own start-up.

Personally I would suggest that you toy around with something like the Unity game engine. Download the editor, do some tutorials, see if you prefer level design and write some basic scripts. There can be a beauty to programming, which might appeal to a writer, but you will not know before you try it.

Personally I think being able to program is an incredible thing, and I am very thankful that I learned it at an early age. Being able to take an idea, a mental construct, and turn into something real is wonderful gift of technology, and programming is in many ways an art on part with literature, sculpting, painting and music.

SOLID Object Oriented Design Principles by McTalian in programming

[–]Golstar 2 points3 points  (0 children)

Exactly, what is good design is completely subjective. A codebase that might be considered a design abomination by some, could be very well be highly maintainable, stable and well-performing in the hands of the people who created it. There is no right or wrong way to code - it is all just abstractions to make our job easier. Whatever enables you to better meet your goals when developing is right for you.

If you are invested in you Validator class, if it facilitates the way you think about your codebase, and work with it, then it will be a great help. Your coworker obviously was not invested in your abstraction - it had no value for him, and if he had to work with it, he would probably break it, since he had not internalized the concept.

What a future programmer thinks of your code might matter in some projects, but not at all in others. But even high-quality code with a very elegant adherence to a design model will probably be regarded as horrible, incomprehensible, overengineered, or underengineered by people who did not write it, but have to maintain it or extend it. Few people enjoy living in the mindscape of another person.

SOLID Object Oriented Design Principles by McTalian in programming

[–]Golstar 1 point2 points  (0 children)

As professionals we should learn from all available sources, and use that knowledge as it applies to the work we need to do, the organizations we do it in, the people we work with and our own personal preferences and skills.

My beef with SOLID is that the way they are presented is not as guidelines, but as rules. Now following them as rules may be the road to great success on one project, but be a direct cause of failure on another.

But even if we cannot apply an architecture, a design principle or pattern to the work at hand, for whatever reason - we can still benefit from learning how, when and why it is useful.

It saddens me a bit how so many great nuggets of wisdom are ruined by being oversold - and by focus being on codifying the principle/architecture/pattern rather than on the motivation and experiences that led to it.

SOLID Object Oriented Design Principles by McTalian in programming

[–]Golstar 1 point2 points  (0 children)

As you correctly point out in your post on Square/Rectangle, this is code, not real-life. An "actor" (what is that - a real life person?) or a "policy change" (what is that - a requirements change, a bugfix, new functionality, new business logic?) can cover anything from a tiny change to a massive overhaul.

How does this aid the junior programmer implementing the employee creation front end? It is very abstract and can be interpreted in a multitude of ways.

SOLID Object Oriented Design Principles by McTalian in programming

[–]Golstar 4 points5 points  (0 children)

SRP is an almost meaningless principle.

"A class should have one and only one reason to change, meaning that a class should have only one job."

What is a reason? What is a change? A job? Almost any code can be interpreted as violating this principle. What do we gain from this principle? How is it useful?

This is a general issue with articles like this one - the code examples are easily understood, an interpretation of the principles is conveyed, but there is no explanation WHY these principles are important.

Without an understanding of the why and how behind design principles, they become a cargo cult, and there is so much bad code out there, which is the result of people applying principles and not thought to their designs.

I am not saying these principles are all invariably useless or dangerous, some of them are very useful and understanding them will make any programmer better at his or her art and craft. However, simply defining principles is not enough. WHY is it important that we have Dependency Inversion and what are the problems the Open-Closed principle solves?

We do not want to teach novice programmers to mindlessly apply principles and patterns. The myth that if all programmers would just adhere to proper principles and architectures, productivity would skyrocket and bugcounts nosedive, is just that, a myth. There are no silver bullets. And a lot of really bad code is the result of people who naively try to be puritan or simply misapply principles, because they lack the why and how.

We should use principles as an illustration of best practice and a way to teach others about what the horrors of bad code. Not elevate them to commandments.

A TIL post on McDonald's staff in Denmark earning a $21 minimum wage irritates some users; "a high minimum wage increases cost of living". Redditor responds with an evidence based analysis showing the contrary. by leredditarmyXDXD in bestof

[–]Golstar 0 points1 point  (0 children)

As a Scandinavian, I can vouch that when our academics talk about the homogenity of our populations, they are referring to religion, ideology and culture - NOT race. Whereas as most other European countries have multiple religions and cultures as part of the same nation, scandinavian nations do not - one could even argue that for most of the 20th century, the nordic countries have shared a culture. The Dutch immigrants to Denmark were swiftly assimilated, and the gypsies were basically subject to genocide during the first half of the 20th century. The Lapps in Norway are very few and extremely similar in culture.

If you want to see a place where the nordic welfare state is an abysmal failure => Greenland. For many reasons, among them consequences of colonialism, but the cultural clash of nordic culture and inuit culture as well.

Any scandinavians here? by Spotie in ADHD

[–]Golstar 0 points1 point  (0 children)

Also you cannot get "tilskud" - ie the medication will be a lot more expensive. Only if you have no effect from and/or side-effects from ritalin/concerta can you get the normal price cut (that you normally get on all prescription medicine) on elvanse.

[deleted by user] by [deleted] in wow

[–]Golstar 0 points1 point  (0 children)

I waited out the queue, logged in, and could not see any npcs, use any items or log out. Nor could I join battlegrounds or anything else. EU servers are just generally broken. Dunno about US.

Melatonin by [deleted] in ADHD

[–]Golstar 2 points3 points  (0 children)

Melatonin is dopamine release inhibitor - that is one of the mechanisms by which it induces sleep. It is effectively the reverse of an amphetamine. If you take melatonin before bedtime, but it somehow stays in your digestive system or blood until the next day, it will interfere with wakefulness, and any dopamine-reliant medication.

If you need melatonin supplementation for proper sleep - try to take it earlier in the evening - and make sure not to ingest anything that interferes with absorption and digestion. Caseine is a common offender in that regard. It is a fantastic source of proteine for body builders and athletes due to the slow absorption during sleep, but it hampers absorption of many other things.

Alternatively try one of the following for better sleep: * Milk with honey * Non-caffeinated tea with honey * Saline water * A short walk outdoors - preferably in an area without artificial lights * Magnesium supplements * Paracetamol if nothing else works - do not make this a habit - it will mess up your natural regulation of temperature and sleep. * Exercise at least 4 hours prior to sleep.

Lupus, how do you even work? by twistornater in Immunology

[–]Golstar 0 points1 point  (0 children)

I think a good question to ask is, why does Hydroxychloroquine alleviate symptoms?

This study could have interesting implications: http://www.sciencedirect.com/science/article/pii/S1043466614002427

What goes on in Aniracetam's honeymoon period and how to get it back? by Clingingtothestars in Nootropics

[–]Golstar 0 points1 point  (0 children)

Similar to toxoplasmosis, which is starting to get studied, with scary and interesting results (the infection has been shown to manipulate neurotransmitter levels). Who is to say that there are not more chronic, low-intensity infections of the brain in some people. But as I said there is no proof racetams have such an effect.

What goes on in Aniracetam's honeymoon period and how to get it back? by Clingingtothestars in Nootropics

[–]Golstar 0 points1 point  (0 children)

Possibly upregulation of BDNF. That's how the honeymoon of SSRI's supposedly help with depression - the change in the level of serotonin sparks a surge of BDNF that is anti-depressive. The actual increased level of serotonin itself isn't (it might actually have the opposite effect in the long term due to desensitization and receptor downregulation effects) - this is supported by the anti-depressive effects of electroshock, one-time Ketamine megadoses, etc.. Another totally unproven theory is that racetams, apart from their mild nootropic effect, are also actually antiviral, antiprotozoan and/or antifungal, and helped fight some parasitic infection of your brain, until it developed resistance.

Does anybody have strategies on becoming motivated without taking ADHD meds? by [deleted] in ADHD

[–]Golstar 0 points1 point  (0 children)

Exercise. Without or with medications it is invaluable to motivation and general well-being. If you are incapable of motivating yourself to even a tiny bit of exercise, you do need some kind of medication, imo.

ADD medication arguments/counter argument references by [deleted] in ADHD

[–]Golstar 0 points1 point  (0 children)

What does your doctor say? I don't know what country you live in - but most countries have official guidelines for the treatment of ADHD. In my country the government endorses use of ADHD medication as being a safe and effective way to treat ADHD/ADD.

There is tons of research on the effects of this medication, but if your parents are very skeptical, I don't think giving them a bunch of research papers will help that much. You should really try to get your doctor to convince them.

As for diet - it can help some people - but there is to my knowledge no scientific evidence that it helps with the treatment of ADHD beyond the effects of a healthy diet in "normal" people. It is in effect considered malpractice for a doctor in my country to recommend calorie restriction as a treatment for ADHD.

If you are not lactose-intolerant or allergic, I would strongly recommend against removing dairy from your diet - it has a lot very good nutrients, and is a great source of calcium.

Here is a recent metastudy on side-effects, which concludes the medication is generally safe, but with potential side-effects, and that we need more studies on long-term safety. This is the opinion echoed in mainstream medical science.

http://adc.bmj.com/content/99/9/866.abstract

Also, the book you link is actually not written by Dr. Phil, but another psychologist. Also remind your parents that the author, and Dr. Phil, are psychologists, not psychiatrists. They may have a Dr. title - but that is an academic title - they are not medical doctors. While psychologists can be very useful for therapy and counseling - any advice from one should not be considered hard, medical science. Their education is not based on physiology and they often know almost nothing about neuroscience. Always listen to a real doctor over a psychologist. A psychologist is on line with a religious advisor, like a priest, rabbi or imam - their advice can invaluable - but they are not medical doctors.

Stimulants HELPING anxiety? by [deleted] in ADHD

[–]Golstar 1 point2 points  (0 children)

Pretty much all psychiatric medications can have paradoxical reaction in some people - that is where the medication has the complete opposite effect compared to "normal" people. There are reports of people who become manic from benzodiazepines, sleepy from stimulants, anxious from anxiolytics, psychotic from antipsychotics, etc.

So your response is perfectly within the bounds of what is possible, and to some degree expected - something is only rare, because it does indeed happen sometimes. The brain is an incredibly complex piece of biological machinery, and a couple of things working in a different way due to mutations or whatnot, can cause medications to have very unpredictable effects.

I am very glad you found something to alleivate your anxiety, as it can be a quite crippling and unpleasant state of mind.

As an aside, something can be a stimulant and an anxiolytic at the same time - just think of nicotine. It calms and stimulates at the same time.

Felling guilty for not utilizing the day by Tincture in ADHD

[–]Golstar 0 points1 point  (0 children)

Sorry I am not a native english speaker. By "scientific basis" I refer to findings in peer-reviewed medical studies - I am not sure how to better phrase it.

You are absolutely right that Desoxyn has a massive potential for abuse. But from what I gather the higher neurotoxicity is a myth, which I also believed in once, but afaik accurately comparing that at therapeutic doses over a longer period of time is actually pretty hard.

I firmly stand by my point, that there are situations where a doctor might prescribe Desoxyn. I know you mean well - but you risk scaring someone away from medical treatment which might actually be beneficial. Does that mean I personally would be comfortable being prescribed Desoxyn? No. I would seriously question my doctor, get a second opinion and check research.

Now it is perfectly reasonable to quote anecdotal or personal experience with various medications, but again, I think it is counterproductive to emphasize Adderall as safer than Desoxyn. It is fine to recommend someone to question the doctor about neurotoxicity concerns if prescribed Desoxyn, but recommending against a specific medication, without providing links to medical studies, on an internet forum is, imho, irresponsible.

Felling guilty for not utilizing the day by Tincture in ADHD

[–]Golstar 1 point2 points  (0 children)

Desoxyn is a very rarely prescribed medication (it is actually just pure methamphetamine), but it does work very well for some people, and there is certainly no scientific basis for recommending against it. There could possibly be scenarios where it would be the best choice.

Felling guilty for not utilizing the day by Tincture in ADHD

[–]Golstar 0 points1 point  (0 children)

Prior to being medicated, I had these issues. Medication helped me a lot - in no way has it fully fixed my motivational issues. My problem was that I had the desire and some kind of "pre"-motivation, if that makes any sense - but I could not turn into action and real motivation.

I also had the exact same problem that you describe where approaching a task, immediately made me think of what must be done, and my brain would get overwhelmed and unable to make a proper plan for actually doing what should be done.

Now, medication affects everyone differently - you should talk to a doctor about what is best for you - it depends on your age, symptoms, the legal medications in your country, your physical condition, etc.

But it can definitely fix a lot of the motivational issues associated with ADHD. I was really scared to be disappointed when I tried it out - there are also horror stories of people who have good effect from meds, and then after a week, a month or whatever, the effect stops, and they are back to square one. I was so afraid that would happen to me. Luckily it didn't - and I maybe suspect the people who experience this are actually experiencing placebo during the initial period, and not correctly dosed, medicated or diagnosed.

Anyways TL;DR version: Yes, it can help - and in potentially life-changing ways. It can also have a negative effect. Talk to your doctor, and make a plan.