Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → Computer Science and Math and Stuff
1234567891011121314151617181920212223242526272829303132333435
Computer Science and Math and Stuff
2018-05-16, 10:03 PM #921
You guys have weird ideas about how important number theory is to professional programmers.
2018-05-16, 10:18 PM #922
I have many weird ideas.
2018-05-16, 10:35 PM #923
Well, initially I tried to convey my own skepticism about the relevance of the 'number theory' problem.

Also Reid, if you think programming isn't just typing stuff into Google, then why did I read this in a lecture slide for a data science course recently:

Quote:
General advice about programming:

  • You will find nearly everything on google
  • Try: length of a list in python
  • A programmer is someone who can turn stack overflow snippets into running code
  • Use tab completion

2018-05-16, 10:41 PM #924
Whoever gave those interviews needs mentoring. Despite that the doc was written for maximum lulz, you can tell there's a disconnect between the interviewer and the candidate in at least a few cases. Some of the code samples look like the candidate couldn't remember how modulus worked, and basically tried random things out of frustration. One candidate was overt about this - the one who (basically) said "hey, I know how to do this, but I don't remember the modulus operator", to which the interviewer responded with a vague and condescending description of what the odd numbers are. This document basically tells me the interviewer: 1.) doesn't understand the purpose of the exercise, 2.) doesn't know how to effectively lead a technical interview, 3.) has done something to put off or unnerve the candidate, probably hampering their performance, and 4.) is more interested in knowing whether the candidate remembers the modulus operator than whether they can provide a solution given sufficient information.

I'm not suggesting these candidates would be any good, but the interviewer needs a lot of work. It is very 'Googly', and that is not a good thing. If I found out that a DR was asking questions like this, or if I saw comments like this on interview feedback, I'd at least pull them from interview duty until I could get them sorted out - but I'd probably also start questioning whether they'd ever be able to grow into a more people-oriented senior role, too.
2018-05-16, 11:24 PM #925
Originally posted by Reverend Jones:
Well, initially I tried to convey my own skepticism about the relevance of the 'number theory' problem.

Also Reid, if you think programming isn't just typing stuff into Google, then why did I read this in a lecture slide for a data science course recently:


I have to google basic **** constantly when I code. My bot project made use of 2 scripting languages and C++ with mutually exclusive syntax. Each time I switched languages, I wouldn't remember e.g. "does an if statement need parenthesis?" or whether to use one or two equal signs for a logical operator. Being able to look that up, and using stack exchange for ideas on proper ways to complete certain tasks is also an important skill.
2018-05-16, 11:33 PM #926
Originally posted by Jon`C:
Whoever gave those interviews needs mentoring. Despite that the doc was written for maximum lulz, you can tell there's a disconnect between the interviewer and the candidate in at least a few cases. Some of the code samples look like the candidate couldn't remember how modulus worked, and basically tried random things out of frustration. One candidate was overt about this - the one who (basically) said "hey, I know how to do this, but I don't remember the modulus operator", to which the interviewer responded with a vague and condescending description of what the odd numbers are. This document basically tells me the interviewer: 1.) doesn't understand the purpose of the exercise, 2.) doesn't know how to effectively lead a technical interview, 3.) has done something to put off or unnerve the candidate, probably hampering their performance, and 4.) is more interested in knowing whether the candidate remembers the modulus operator than whether they can provide a solution given sufficient information.

I'm not suggesting these candidates would be any good, but the interviewer needs a lot of work. It is very 'Googly', and that is not a good thing. If I found out that a DR was asking questions like this, or if I saw comments like this on interview feedback, I'd at least pull them from interview duty until I could get them sorted out - but I'd probably also start questioning whether they'd ever be able to grow into a more people-oriented senior role, too.


Agreed entirely, the dude's not doing a good job. Good work flow can't be achieved by suppressing people's need to find out information, by semi-shaming them for not understanding what to do. A good employee isn't one who knows, but one who can learns and adapt. People can't adapt and ask the right questions/adapt in the context he's provided.
2018-05-16, 11:37 PM #927
Originally posted by Reid:
I have to google basic **** constantly when I code. My bot project made use of 2 scripting languages and C++ with mutually exclusive syntax. Each time I switched languages, I wouldn't remember e.g. "does an if statement need parenthesis?" or whether to use one or two equal signs for a logical operator. Being able to look that up, and using stack exchange for ideas on proper ways to complete certain tasks is also an important skill.


Which, by the way, now has full combat, fishing, navigation, basically a full suite. The only thing keeping me from posting it on github until I get a cease & desist is 1) my sanity and 2) my lack of desire to make a user friendly (i.e. several layers of idiot proofing) UI frontend. Last thing I want to do is write up a massive readme on how to set up the pieces i have.

So the projects pretty dead.
2018-05-16, 11:39 PM #928
Originally posted by Reid:
Agreed entirely, the dude's not doing a good job. Good work flow can't be achieved by suppressing people's need to find out information, by semi-shaming them for not understanding what to do. A good employee isn't one who knows, but one who can learns and adapt. People can't adapt and ask the right questions/adapt in the context he's provided.


My favorite is the one who had a panic attack then withdrew their application. But it's not the interviewer's fault! They weren't trying to break him!
2018-05-16, 11:46 PM #929
Originally posted by Reid:
I have to google basic **** constantly when I code. My bot project made use of 2 scripting languages and C++ with mutually exclusive syntax. Each time I switched languages, I wouldn't remember e.g. "does an if statement need parenthesis?" or whether to use one or two equal signs for a logical operator. Being able to look that up, and using stack exchange for ideas on proper ways to complete certain tasks is also an important skill.


I agree with you here. But you are saying that Stack Overflow enhances your ability to program. The lecture slides were saying that Stack Overflow is one's ability to program, and although they were probably being cheeky, the part that made me a little sad was the subtext that it's not necessary to know anything about computer science to be productive.
2018-05-17, 12:27 AM #930
Originally posted by Reid:
Idk, I feel like it's not hard to meet clients for programming work? It's all over the place
It depends on your market and expertise. You’re a student generalist in the Bay Area, so right now you have the most exposure to potential clients that you’ll ever have again. It’s a different situation for a deep Java expert in the Midwest, for example.

That said, the odds are good but I suspect the goods are odd. Even at my alma mater, people preyed upon CS undergraduates looking for cheap labor. It got to the point where I’d only agree to meet people if I was referred by a professor, and I still got a lot of pushback on compensation... as in, asking for any compensation, instead of doing the work for free. Other students were not so prudent.

Originally posted by Zloc_Vergo:
wikipedia page for matrix multiplication stated O(n^2.7), other pages look like they're stating O(n^2.4), so both better than cubic but still bad enough that it's not practical for me
The optimal upper bound for square matrix multiplication is unknown. None of the subcubic algorithms are of practical interest.

That is for general matrices. Are there exploitable patterns in your matrices? You mentioned upper-triangular, which halves the number of multiplications and additions you need to do. Are they block matrices? Do they have an efficient decomposition? Even if it doesn’t save you any asymptotic time, cutting your matrix down to something that fits in your CPU cache has very different real world performance characteristics.

Originally posted by Reverend Jones:
I agree with you here. But you are saying that Stack Overflow enhances your ability to program. The lecture slides were saying that Stack Overflow is one's ability to program, and although they were probably being cheeky, the part that made me a little sad was the subtext that it's not necessary to know anything about computer science to be productive.
Why? Most programming jobs are data plumbing. Why should a web front end developer know anything about computer science?
2018-05-17, 12:47 AM #931
Originally posted by Jon`C:
Why? Most programming jobs are data plumbing. Why should a web front end developer know anything about computer science?


You're right!
2018-05-19, 11:26 AM #932
Originally posted by Jon`C:
My favorite is the one who had a panic attack then withdrew their application. But it's not the interviewer's fault! They weren't trying to break him!


Precisely, I'm guessing they were never involved with HR, if you're people-facing it should be part of your job to detect when a person's undergoing stress and how to manage the situation. Nope! Apparently it's better to make fun of them online after.

Originally posted by Reverend Jones:
I agree with you here. But you are saying that Stack Overflow enhances your ability to program. The lecture slides were saying that Stack Overflow is one's ability to program, and although they were probably being cheeky, the part that made me a little sad was the subtext that it's not necessary to know anything about computer science to be productive.


I esteem the world too much to want to interpret that as anything but a joke. Say it ain't so! I know people can learn programming easier than that..
2018-05-19, 1:59 PM #933
Computer science: You ain't gonna need it.

Googling compiler errors? The most extreme form of XP!
2018-05-19, 4:17 PM #934
Are we ragging on software processes? Because oh boy do I have a lot to say about the agile cult.
2018-05-19, 4:49 PM #935
My company hired agile consultants a few years ago and our entire dev and planning processes have been nightmarish ever since. I have no idea why management insists we keep doing it.
2018-05-19, 5:09 PM #936
Agile processes don’t address software engineering problems, they address severely defective management. Severely defective management is sadly typical in this industry, so agile processes are a great idea a lot of the time and I’m not advocating for their discontinuation.

No, my problem is with agile fans. The religious devotees who view agile processes as the One True Way to develop software, and any other kind of process is backwards and deserving of scorn. And my problem isn’t that they like agile, it’s that religious devotion to agile processes is the same thing as religious devotion to incompetent management. It’s saying that we always need agile because we can’t ever expect good management, and that we shouldn’t even want good management because bad management is a necessary part of how software is built.

But this attitude works fine for most developers. Your hardest problems aren’t technical, they’re people. Nobody in your company knows to do (or how to do) product design or primary market research. Your bosses have no strategy and are counting on a strategy shaking out of product development. So yeah, in this kind of setting agile can easily become your be-all-end-all.

And then you program a self-driving car, and it starts killing people.
2018-05-24, 10:41 PM #937
Waking up and doing group theory problems for ~8 hours/day turns out to be kinda fun. My job here is basically doing sudoku puzzles, except really hard and more rewarding.
2018-05-25, 6:55 AM #938
Originally posted by Reid:
more rewarding.


that' sup for debtae
2018-05-26, 2:31 PM #939
Do people publish studies on customer conversion? A friend of mine was wondering why so many MMOs have broken content that isn't fixed when they released new content, their view being bad entry content will turn away new players. It's intuitive to me that converting existing customers into buying expansions, DLC and so forth is easier and more consistent than converting non-players to players, but I have no data.
2018-05-26, 2:43 PM #940
https://hbr.org/2014/10/the-value-of-keeping-the-right-customers
2018-05-26, 3:02 PM #941
Fair enough, and existing customers can already tolerate slightly broken content, so developers have the best goose for laying golden eggs there than anywhere else.

I should probably read content like HBR more often, though so far I've found business to be intuitively easy to be competent in, and we all know how "knowing" things can sometimes make you worse at a task.
2018-05-26, 3:37 PM #942
That’s sometimes true, but in this case the question is accounting, not something subjective like marketing or management. You aren’t gonna do something if it pushes your CAC over LTV.
2018-05-26, 7:26 PM #943
Yeah, I shouldn't bundle that many topics under one umbrella that way.
2018-05-29, 2:23 AM #944
I've been experimenting with a lossless binary texture compression algorithm.



A few years back, Valve published a paper about using signed distance fields to encode vector graphics. The technique worked okay but had some unfortunate artifacting around sharp corners.

As future work, Valve's original paper suggested anding multiple signed distance fields together in order to make those corners sharp again. Generating such a (multi-channel) signed distance field isn't trivial. I've seen two papers from other authors that tried to do it, with varying success and various unfortunate artifacts. Usually these approaches require vector graphics, which I've always considered to be somewhat of a non-starter; what I really want to do is encode high-resolution raster graphics. I've been experimenting with that off and on for a few years, but never really made much progress.

This is something completely different. It uses basically the same decoder shader as a typical signed distance field implementation, but the generator is something else. Instead of distance fields, the algorithm chops the image into strips, and uses a scanline to determine how the texture changes from one side of the strip to the other. Each pixel encodes one of 8 state transitions (e.g. all outside, all inside, outside to inside, inside to outside, etc.) along with the x coordinates at which the transitions happen. The original image is reconstituted via bilinear filtering.

Still have more work to do. Want to see if I can extend this 'compression' to 2D somehow, instead of just 1D. Probably need to do some work to keep it from looking super ugly under mag filtering (vertical scaling), And some numerical precision issues.
2018-05-29, 6:18 AM #945
Is VRAM still that tight?
2018-05-29, 10:16 AM #946
Originally posted by Reid:
Is VRAM still that tight?


No. The real goal isn't to make the texture smaller, it's to get a clean edge at any scale without aliasing. It just happens that this family of techniques involves reducing the size of a source texture;
2018-05-29, 12:12 PM #947
Okay, so the only thing I think I'm not grasping is the "state transition" thing. What are inside and outside in reference to?
2018-05-29, 12:31 PM #948
Originally posted by Reid:
Okay, so the only thing I think I'm not grasping is the "state transition" thing. What are inside and outside in reference to?


The sweep line stage of the algorithm generates events. Example: sweep left to right, at y coordinate 0.65, x coordinate 0.12, the sweep line transitions from outside the shape to inside the shape (texture goes from false to true). That event list gets chopped up into vertical slabs which contain at most 3 events. Those slabs are encoded into the texels of a new texture. The decoder is a Mealy machine that reads those texels left to right, transits between states (Z/256Z ^ 3), and prints out the encoded events. This Mealy machine may be implemented using bilinear filtering.
2018-05-30, 3:42 AM #949
Anyone know open source library to edit Windows login password? I am planning to build a tool for password recovery.
2018-05-30, 6:29 AM #950
Originally posted by mcgrayhou:
Anyone know open source library to edit Windows login password? I am planning to build a tool for password recovery.


http://www.oxid.it/cain.html
2018-05-31, 6:36 PM #951
Originally posted by Reid:


Pretty awesome for the suggestion.
2018-05-31, 7:26 PM #952
Yup, Windows has not changed its password hashing method in a long time. You'll be able to dump & crack the NTLM hashes.
2018-05-31, 7:57 PM #953
I just found out about a pretty damn funny exploit WoW had a few years back. Apparently, each time you received a chat message, your client will run the lua function "RemoveExtraSpaces" with the chat message as an argument to do what the function was named for.

Well, in LUA, you can assign functions. So, if you could convince a player to run the bit of code RemoveExtraSpaces=RunScript, well.. the game would instead attempt to run every message received as a script. Including whispers sent from other players.

That exploit is basically a part of every version of WoW previous 2016. Pretty incredible for such a simple exploit.
2018-05-31, 8:21 PM #954
Late binding is a crime against humanity
2018-05-31, 8:39 PM #955
Originally posted by Reid:
So, if you could convince a player to run the bit of code


Yeah, that's not an exploit.
2018-05-31, 9:19 PM #956
Originally posted by Reverend Jones:
Yeah, that's not an exploit.


You can run lua code from the chat window
2018-05-31, 9:29 PM #957
I see now that RunScript is an existing Lua function (and not a name for some new function the user would have also had to paste in a definition of).

I always thought that the moment you run untrusted code, you've gone from the realm of exploitations to self-inflicted wounds, but on the other hand, that's a pretty innocuous looking line of code for what it does.
2018-05-31, 9:35 PM #958
It's a language that lets you monkey patch the global namespace, of course it has a built-in eval function.
2018-05-31, 9:36 PM #959
Originally posted by Reverend Jones:
I see now that RunScript is an existing Lua function (and not a name for some new function the user would have also had to paste in a definition of).

I always thought that the moment you run untrusted code, you've gone from the realm of exploitations to self-inflicted wounds, but on the other hand, that's a pretty innocuous looking line of code for what it does.


The exploit actually took place on live servers and wrecked a few guilds, so apparently convincing enough.

Apparently the person claimed to be selling an expensive mount for nearly half cost, and during the conversation made up some things to test and that line was in it. From what I gathered.
2018-05-31, 9:39 PM #960
From everything I've personally seen in ESO and from WoW: if you're going to support scripting, be damn well sure you understand how the language you're implementing works.
1234567891011121314151617181920212223242526272829303132333435

↑ Up to the top!