HNHacker News
TopNewBestAskShowJobs

photon_lines

809 karma · joined January 5, 2019

submissionscomments
photon_lines··on Bug squash: An underrated interview question
FYI just small tip on the Windows / Node front, you should just install & use NVM instead of Node directly - will make many headaches go away.
photon_lines··on Bug squash: An underrated interview question
Sorry, but do you have any data that shows 'great' candidates run tests and use your approach of finding / fixing bugs? Read the book 'Coders at Work' which describes some of the best developers of all time - most of them use print statements to find bugs / debug. Btw, I've solved bugs in 2-5 minutes which some developers spent hours or days working on (to their amazement) -- I've done this countless times in the past without using code or any debugging / testing tools -- all it took was reading the code and figuring out in my head what was going on and which data elements could introduce problems -- so I suppose I belong in your list as well? Sorry I just want to see the thought process here, to me it makes 0 sense and all the HN commenters commending the parent article are also making me absolutely scratch my head since the suggested process makes many many assumptions without having any data to back them up.
photon_lines··on Robot dentist performs first human procedure
Hopefully they also provide a pair of adult diapers for each test subject :)
photon_lines··on Taking my diabetes treatment into my own hands
I already mentioned some of this in another response, but I'll include it here as well: you can take measures to not have to take medication / insulin if you have type 2 diabetes. The number one thing to avoid it is to stay lean and not be over-weight, but some other things which can greatly help out:

- Exercise: 'Exercise plays a major role in the prevention and control of insulin resistance, prediabetes, GDM, type 2 diabetes, and diabetes-related health complications. Both aerobic and resistance training improve insulin action, at least acutely, and can assist with the management of BG levels, lipids, BP, CV risk, mortality, and QOL, but exercise must be undertaken regularly to have continued benefits and likely include regular training of varying types. ' - Source: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2992225/

- Intermittent fasting: there's great evidence that IF (intermittent fasting) can put it in remission: https://www.endocrine.org/news-and-advocacy/news-room/2022/i...

- Minimally processed and ketogenic diet: avoid foods which have sugar or high-fructose corn-syrup and mostly stick to low-glycemic index minimally processed foods. 'Diets with a high glycaemic index and a high glycaemic load were associated with a higher risk of incident type 2 diabetes in a multinational cohort spanning five continents. Our findings suggest that consuming low glycaemic index and low glycaemic load diets might prevent the development of type 2 diabetes.' - Source: https://www.thelancet.com/journals/landia/article/PIIS2213-8...

- Take a teaspoon with turmeric + black-pepper daily: 'Clinical trials and preclinical research have recently produced compelling data to demonstrate the crucial functions of curcumin against T2DM via several routes. Accordingly, this review systematically summarizes the antidiabetic activity of curcumin, along with various mechanisms. Results showed that effectiveness of curcumin on T2DM is due to it being anti-inflammatory, anti-oxidant, anti-hyperglycemic, anti-apoptotic, anti-hyperlipidemia and other activities. In light of these results, curcumin may be a promising prevention/treatment choice for T2DM.' - Source: https://www.preprints.org/manuscript/202404.1926/v1

photon_lines··on Taking my diabetes treatment into my own hands
I can't answer this question for you, but some life-style factors which I think will help you avoid getting it are provided below:

- 5-10g of vitamin D daily (assuming you're talking about type 1 diabetes) - type 1 diabetes is an auto-immune disease, and vitamin D plays a huge role in regulating our immune systems. In fact, type 1 diabetes is more prevalent for those who move from warmer countries to colder ones where there's less sunlight that those who do the opposite.

- Exercise: probably the single best thing you can do for your brain and body, and does a wonder in regulating the immune system and helps out many with not just diabetes, but with a ton of other disorders and the higher intensity the exercise, the better. Exercise which increases your VO(2) max here is the best - both strength training and interval training are highly effective.

- Intermittent fasting (and staying lean): assuming that you're attempting to avoid type 2 diabetes, there's great evidence that IF (intermittent fasting) can put it in remission: https://www.endocrine.org/news-and-advocacy/news-room/2022/i...

- Minimally processed and ketogenic diet: avoid foods which have sugar or high-fructose corn-syrup on the ingredients list. In fact, in my case, I try to avoid any foods with more than 5 ingredients and try to stick to mostly a plant based and keto diet (this definitely helps with type 2 diabetes). Also avoid high-glycemic index foods (high-glycemic here means ability to 'spike' sugar and you can find the glycemic index of most foods through a simple good search. More info on this index: https://en.wikipedia.org/wiki/Glycemic_index ).

- Take a teaspoon with turmeric + black-pepper daily: 'Clinical trials and preclinical research have recently produced compelling data to demonstrate the crucial functions of curcumin against T2DM via several routes. Accordingly, this review systematically summarizes the antidiabetic activity of curcumin, along with various mechanisms. Results showed that effectiveness of curcumin on T2DM is due to it being anti-inflammatory, anti-oxidant, anti-hyperglycemic, anti-apoptotic, anti-hyperlipidemia and other activities. In light of these results, curcumin may be a promising prevention/treatment choice for T2DM.' - Source: https://www.preprints.org/manuscript/202404.1926/v1

photon_lines··on Taking my diabetes treatment into my own hands
Type 1 diabetic as well here - I do this and I can confirm that I have much better control over my HB1C (average blood sugar reading) since I eat mostly a keto and plant based healthy diet (composed of minimally processed foods). One issue that I have though deals with hypoglycemia (low-blood sugar levels) since type 1 diabetics don't just require immediate insulin after meals - they require long-term acting insulin which works throughout the day. I've had multiple cases where I lost consciousness and woke up either in an ambulance or in a hospital feeling like someone hit me with a truck and having no recollection of how I got there. There is no 'magic' in managing type 1 diabetes unfortunately. The issue with us is that our blood sugar can swing in both directions - with the lower swing possibly resulting in death.
photon_lines··on The Illustrated Transformer (2018)
Great post and write-up - I also made an in-depth explorations and did my best to use visuals - for anyone interested you can find it here: https://photonlines.substack.com/p/intuitive-and-visual-guid...
photon_lines··on The loneliness of the low-ranking tennis player
Agassi is a far outlier though. I'm not saying that it's not a lonely road, but I remember reading about his dad being a compulsive gambler and him having to play a match for their house when he was 12-14 years old. Think about what it's like having to grow up and go through something like that -- how would you be able to relate to other players who are close to you in rankings? Either way kudos to him for taking that on.
photon_lines··on The loneliness of the low-ranking tennis player
Here's a fantastic piece by him talking about how amazing Federer was when he first came up: https://www.nytimes.com/2006/08/20/sports/playmagazine/20fed...
photon_lines··on The loneliness of the low-ranking tennis player
Because when you aim for the moon -- even if you miss, you will still be a success (in my mind). I would rather live life as a failed scientist trying to reach a revolutionary breakthrough in understanding or following what I feel is my passion -- even if my odds of reaching what I want to reach may be 0.001 percent, at least striving to reach that point is a great adventure and the pain that comes with it is something worth it and there's no shame in that. More people I think should try it.
photon_lines··on The loneliness of the low-ranking tennis player
I'd say from my limited vantage point that it looks like it's only partially social pressure. The media glamourizing sports stars I'd say is the root-cause. This doesn't just apply to tennis - it applies to every sport. Look at what Jordan did to the NBA and how many kids wanted to be in his shoes growing up -- they don't realize what comes with the 'gift' though may not be glamorous or worth the price you pay. You mostly see the very rich life-style and fan-worship -- behind the scenes most people don't realize the hard work and pain and the pressure some of these athletes have to experience in order to get there. On another note - if anyone wants a great example of this here's a great read (called Federer as a Religious Experience and it's still my favorite piece of sport-writing after 15+ years): https://www.nytimes.com/2006/08/20/sports/playmagazine/20fed...
photon_lines··on An intuitive guide to Maxwell's equations (2020)
You're 100% correct. The explanations I was reading gave me the impression that we can get rid of the magnetic field - but this only works in special cases. Right now I'm reviewing my notes and realizing that yup - they're both needed and will need to modify my explanation there or simply get rid of it entirely and keep things simple. Once again - thank you for the correction - you're a life saver this is definitely something which I overlooked and I wish I had more time to explain properly!
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
Yup - well this is where my suggestion is to change the GPT architecture. You can think of having a logic program function as the 'frontal lobe' of the general pre-trained auto-associative model. This 'frontal lobe' region would try to come up with logical sequences to go along with it's internal auto-associative representations. Of course - the logic programming piece is just one approach - maybe chain of though or chain of reason prompting could work here too as many humans I think use this chain-of-reasoning approach themselves. Logic programming to me would function as a suggested shortcut.
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
What happens when you don't give a human being the correct answer? :)
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
Yup this is a good example. This is because the model has no conception of what 'causality' is or how to try to come up with a correct 'model' - humans have a visual system which helps them out, but for LLMs I can definitely see your point and yup in these instances - if you feed in garbage data then yeah - you will get garbage out.
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
Will note this and try to add a TOC next time I do this sort of write-up. This article wasn't supposed to be this long - I originally meant to make a more compact version but kept on finding more things which I needed to add in order to map to a correct 'mental model' of what ChatGPT is.
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
So instead of shouting insults, maybe you can shine some light on how anything stated there is wrong? Everything that I said there is true - we don't have a good mapping of what consciousness is - if you want to add some insights add them instead of making insulting and useless statements on HN.
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
Sure - with the Alice example, when I saw the problem I came up with a really simple visual example of Alice having 3 sisters and 4 brothers. When I visualized it I saw Alice standing next to 3 other women (her sisters) and her 4 brothers standing close by. When I imagined asking her brother how many sisters he has, I could see that Alice was standing there next to 3 other women and thus came up with the answer of 4. Does this make sense?
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
'It's impossible to plan without an internal monologue.' - Sorry, but I disagree with this. I have no 'internal voice' or monologue - whenever I see a problem, my brain actually and fully models it using images. I believe 25% of the population doesn't have the internal monologue which you're referring to and this has been tested and confirmed. I highly recommend listening to this Lex Friedman podcast episode to get a full grasp on the complexities of modelling language and general modelling present in the human brain: https://www.youtube.com/watch?v=F3Jd9GI6XqE
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
I actually did a full write-up on this here fyi: https://photonlines.substack.com/p/intuitive-and-visual-guid.... You can skip most of this and scroll down to the end-section called 'The Mental Model for Understanding LLMs' where I try to map how transformers are able to mimic human thinking. I think that comparing them to auto-associative / auto-regressive networks is actually a really good analogy FYI and I do believe a lot of human learning is based on this.
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
Yup - well you feed in the prompt along with an answer and you get the model to produce outputs and check for discrepancies. If the answer is wrong then the model adjusts -- this is the way backpropagation works....I think there are huge advantages in using logic languages in order to represent some of these data sets rather than simple English or the current chain-of-thought reasoning approaches -- backpropagation as an example isn't really used in the human brain, but it leads to great results in mimicking how neural networks 'learn' - in the same way, we don't have to have the full formal picture of how humans model the logical world in order to achieve great results. We can simulate this using logic programming or even general programming or at least that's my conjecture.
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
You can get models to actually show that 'logs' could function as 'chairs.' You're forgetting that we humans also learn this as well, but we learn this in a much simpler manner than LLMs though so someone has to explicitly let models know what assumptions they can make. You get the LLM to write Prolog programs and learn associations in this manner. As the model gets better at logically modelling the problems - the solutions to prompted problems like this should get better.
photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
I'm not sure what you mean by 'it will not scale well.' When we humans learn that we make a mistake - we make a note and we hold the correct answer in memory - the next time we're prompted with a similar prompt, we can use our old memories to come up with the correct solution. I just did a simple test for this same exact problem using ChatGPT 3.5:

'Can you reformulate the following problem using Prolog? When you execute the program - what answer do you get? 'Alice has 8 brothers and she also has 5 sisters. How many sisters does Alice’s brother have?'

Even though it came up with a proper Prolog formulation - it failed to account that Alice is one of the sisters - so I gave it a simple prompt for this and it was able to correct the formulation and come up with the proper solution:

My prompt after ChatGPT gave me an answer of 5: 'Yes but you aren't including Alice in your logic. Shouldn't the correct answer be 6 (since Alice is also a sister)?'

Response:

'You are correct. The correct answer should account for Alice being one of the sisters. Let's adjust the Prolog program to include Alice in the calculation:

% Facts brothers(alice, 8). sisters(alice, 5).

% Rules sisters(Brother, NumSisters) :- sisters(alice, Num), NumSisters is Num + 1. % Include Alice herself

% Query ?- sisters(alices_brother, NumSisters).

In this updated Prolog program:

The rule for determining the number of sisters includes Alice herself by adding 1 to the number of sisters Alice has.

When we execute the query ?- sisters(alices_brother, NumSisters). in Prolog, we should get:

NumSisters = 6.

This correctly reflects that each of Alice's brothers has 6 sisters, including Alice herself.

When I prompt it to answer this question using Prolog now, I always get the correct answers no matter which integers I feed in, so it seems like the model is able to generalize after I show it where it's 'reasoning' was wrong. Basically, my suggestion is to get the model to recognize logic puzzles like this and try to formulate them in terms of logic programming queries which it can use and tune in order to come up with correct answers rather than simple auto-associative chain of reason training which current GPT models rely on, but like I said - this is my hypothesis and I believe this would work much better in getting these models to 'generalize' than the current approaches we're using. Hopefully this helps.

photon_lines··on Simple tasks showing reasoning breakdown in state-of-the-art LLMs
There's actually a pretty simple solution to this that I thought about testing out and it involves asking the model to re-construct the problem using a logic language (like Prolog) and asking it to execute this type of program in order to come up with a solution rather than attempting simple chain-of-reason training / other methodologies of getting the model to 'reason' through some of these examples. People forget that humans don't come up with their logical models out of the blue - it takes years of elementary school in order for us to understand the world and solve problems in it. The logic programming approach I'd say is really promising but you would need to feed the LLM a LOT of examples in order for it to work, and currently I'm not even sure that we have enough training data in order to implement something like this.
photon_lines··on An animated introduction to Fourier series
Great work!! Note to author: you misspelled Heaviside step function: https://en.wikipedia.org/wiki/Heaviside_step_function. I also highly recommend 'Who Is Fourier?: A Mathematical Adventure.'
photon_lines··on An intuitive guide to Maxwell's equations (2020)
Sure - like I said, it's hard for me to say what my favorite is without naming a category, but since we're on the topic of Electromagnetism I'll stick to physics and recommend 1) Introduction to Elementary Particles by Griffiths (best into to standard model in particle physics) and 2) QED by Richard Feynman. QED btw is very well done and literally shows you the 'algorithm' behind standard particle physics and does so in a clear and unambiguous manner - really an amazing work by Feynman.
photon_lines··on Ask HN: Who wants to be hired? (June 2024)
Location: Toronto, ON, Canada

Remote: Yes

Willing to Relocate: Yes

Technologies: Python / C# / .NET. / Java / JavaScript / SQL / Generally Language Agnostic.

Github: https://github.com/photonlines

Blog: https://photonlines.substack.com/

LinkedIn: https://ca.linkedin.com/in/nickmiljkovic

photon_lines··on An intuitive guide to Maxwell's equations (2020)
'What did you study in your undergrad?' - Computer Science. I study applied math and physics in my spare time - I'm currently teaching myself quantum field theory and other topics. For the most part - they're incomprehensible to an average person which is why I'm so passionate about doing what I'm doing - all of this stuff is extremely simple underneath but we humans find ways to make it complicated. Why not untangle that complexity and simply explain things in a clear and intuitive manner? Also - your comments on your undergraduate ease of grasping Maxwell's equations usually don't apply to everyone. Many professors don't sketch out what they mean and many books don't go through the fundamentals that students need in order to grasp what they mean. This guide is supposed to give someone a good background on 1) what they need to understand in order to grasp the equations and 2) what the equations actually mean in clear human language. Hopefully this helps - I also haven't had a chance to read Jackson but he's been mentioned so many times that right now I'll make a note to actually read the book and see how well he explains the concepts and see if I can maybe find other ways of making things simpler.
photon_lines··on An intuitive guide to Maxwell's equations (2020)
Thank you for the feedback. I'll review my notes and see if I can clarify this section - my key point there was simply to show that the magnetic field isn't really necessary - I wanted to show that it's all part of relativistic contractions made by the electric field. If I made any errors I give you my sincere apologies. Btw if you want to make edits to my work directly - you can find it as it's fully open source: https://github.com/photonlines/Intuitive-Guide-to-Maxwells-E...
photon_lines··on An intuitive guide to Maxwell's equations (2020)
Thank you!! Vexlio has no learning curve - it's literally so easy to use that I haven't had to read ANYTHING in order to get accustomed to doing what I need to do. I simply open the program and the UI is so intuitive that literally you will simply have no issues figuring out what you need to do to accomplish what you want to accomplish. When it comes to books: what are you interested in? Math / physics books or more general stuff? My favorite book of all time is 'Crime and Punishment' - it literally shows you how Dostoevsky thinks and puts you inside of his mind - not many books can do this.
← PreviousPage 3 of 9Next →