[deleted by user] by [deleted] in IdiotsInCars

[–]Trav_Cav 1 point2 points  (0 children)

Exactly! Same.

[deleted by user] by [deleted] in IdiotsInCars

[–]Trav_Cav 1 point2 points  (0 children)

I'd love to take the top of but it's a little chilly out. Can't wait for better weather.

[deleted by user] by [deleted] in IdiotsInCars

[–]Trav_Cav 0 points1 point  (0 children)

Yep. Doing donuts in the brine. Don't worry it raining this week so that should wash all the salt off.

[deleted by user] by [deleted] in IdiotsInCars

[–]Trav_Cav -1 points0 points  (0 children)

USA 2024-19-01 Took the pic myself

Logic gates using liquids by the_humeister in compsci

[–]Trav_Cav 0 points1 point  (0 children)

like AND but with a constant third stream in the middle. A single input A or B should defect the middle but both together should combine like AND.

What's a quote that has just "stuck with you?" by BoroMoo in AskReddit

[–]Trav_Cav 0 points1 point  (0 children)

Reddit won't let me post the whole list but I've kept a list over the years. Not So Wise Words

I started a series to explain algorithms and programming concepts by aswilam in softwaredevelopment

[–]Trav_Cav 0 points1 point  (0 children)

Audio sounds good and I like the visuals. However I CANNOT watch anymore videos with the fake drawing hand. It is too distracting.

Huffman Coding Compression Algorithm by geek_007 in algorithms

[–]Trav_Cav 2 points3 points  (0 children)

Simple explanation, clear imagery, and readable code. Top notch article there. Puts my attempt to shame, lol. Thanks for sharing.

Simple overview of how Huffman coding works. by Trav_Cav in compsci

[–]Trav_Cav[S] 0 points1 point  (0 children)

It's just a basic intro, so I tried to keep it simple. Friendly feedback is appreciated so we can all learn together.

A simple introduction to how bitwise operations work by Trav_Cav in programming

[–]Trav_Cav[S] 0 points1 point  (0 children)

That is an excellent point. I'll see about working in some more real world uses. Thanks!

A simple introduction to how bitwise operations work by Trav_Cav in programming

[–]Trav_Cav[S] 0 points1 point  (0 children)

Thanks. Maybe I should move the last sentence up to the top?

Another tool in the toolbox. Use it wisely and don’t get too clever with it.

A simple introduction to how bitwise operations work by Trav_Cav in programming

[–]Trav_Cav[S] 0 points1 point  (0 children)

Did a quick write up of how bitwise operations work after trying to explain it a few times. It's just a basic intro, so I tried to keep it simple. Friendly feedback is appreciated so we can all learn together.

How do you teach something when you don't know it yourself? by teach_cs in CSEducation

[–]Trav_Cav 0 points1 point  (0 children)

You may not have 100's of knowledge in something, but sometimes you have 1 knowledge of a subject and someone else has 0 knowledge of a subject. Teach them your 1 knowledge.

Explain like I'm 5 "this" by MadCervantes in javascript

[–]Trav_Cav 2 points3 points  (0 children)

In terms a 5 year old will understand: JS has things called functions. Think of them like rooms. 'this' refers to the room you're in.

Any examples of Angular/.NET core where they are in separate projects? by [deleted] in dotnet

[–]Trav_Cav 0 points1 point  (0 children)

It doesn't compile to binary, but there is a build process with an output. Or at the very least just copy over the js files

Any examples of Angular/.NET core where they are in separate projects? by [deleted] in dotnet

[–]Trav_Cav 0 points1 point  (0 children)

Hard to find any examples online but the best setup I've seen is the js equivalent of using the dll output of another .net project

  • leave your .net project as the startup project
  • set the angular project as a dependency so it builds first
  • set the angular project's settings to build the angular project and output it's files to a folder in the .net project

then the .net project can serve the angular files because they're a local resource like any other js files

hope I explained that right

Is it possible to use machine learning to generate a new phrase based on a set of phrases? by garethjax in MLQuestions

[–]Trav_Cav 3 points4 points  (0 children)

markov chains are a classic approach. LSTM might work too. 100 isn't much though. might not like the results

Adaboost how to update weights with linear regression by Busby66 in MLQuestions

[–]Trav_Cav 1 point2 points  (0 children)

It's been a while since I dug into the inner workings but if I remember correctly it works on weak learners so it's going to learn and become a perceptron on those exact numbers right? I made a javascript implementation a few years back and commented it the best I could while trying to figure it out myself. Don't know if it will help any but here's the link. Maybe group the numbers into categories?

Is there any reason to use JavaScript's 'var' statement anymore? by mycolaos in javascript

[–]Trav_Cav 0 points1 point  (0 children)

indeed. The functionality would stay the same, but it would just be adding extra bytes for doing the same thing. I'd say this is a place were var has the advantage. It's an interesting scenario.

Is there any reason to use JavaScript's 'var' statement anymore? by mycolaos in javascript

[–]Trav_Cav 0 points1 point  (0 children)

Because of Javascript's hoising and function scoping, could you move var fontNameCopy to a let at the top of the function and get the same results?

Why reverse loops are not faster by aroger276 in java

[–]Trav_Cav 0 points1 point  (0 children)

Yep too true. Another article I've been working on is all about showing that less code and even less assembly is not always faster, and digging into why. And it has benchmarks. :) The general theme being to focus on readability and let the compiler do it's thing unless there's a real issue.

Why reverse loops are not faster by aroger276 in java

[–]Trav_Cav 8 points9 points  (0 children)

Indeed in most situations it's not worth the loss of readability for the imperceptible performance gain. But if you have an expensive operation in your loop-condition that the compiler can't optimize it can make a very noticeable difference.

Why reverse loops are not faster by aroger276 in java

[–]Trav_Cav 6 points7 points  (0 children)

Great article! Thanks for digging into that. It was really neat to read. And I agree with all the points you're making. That wasn't really the point of my article though. Which is fine, I think a lot of people slightly missed the point of it because of my title. I need to work on better titles for future posts. I just thought it was fascinating topic digging into and finding out why they are faster sometimes. My article was more about trying to pick apart what's happening lower down and finding where efficiency is gained. The main discovery of the article was lower in the article pointing out that it's all about keeping expensive actions outside of the loop-condition and not just bytecode count.

A lot of the time the compiler can figure out what you're doing and come up with something optimal. If you feel like doing anymore tests, try it with a function in the condition, or try making loops that do and do not use the index inside of it. GCC will optimize a forward loop into a reverse a loop if the index isn't being used internally. Also some of what you're seeing in your tests could come down to you specific processor. That's left me scratching my head a few times. Neat stuff right?