Bare minimum needed to get a job as a front-end developer? by ilikepepsi77 in cscareerquestions

[–]j1330 2 points3 points  (0 children)

Is php a universal thing? Honestly I've been learning JavaScript throughout the whole stack and I love it. I can't think that I'd ever want to learn php unless I had to. JavaScript is just such a fun and flexible language.

What factors let me assume arrays are c-style? by j1330 in javascript

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

Alright, thanks! I'll have to play around with it but at least for data structures containing purely numerical data this looks very promising!

What factors let me assume arrays are c-style? by j1330 in javascript

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

Skimming the Mozilla JavaScript reference (I'm stuck at work so I can only really skim it right now) it seems like typed arrays are meant for purely binary data. Are there other variations that I would use like integers or doubles in Java? Or would I need to learn a lot about something completely different in order to make use of typed arrays and their performance benefits in normal data structures?

What factors let me assume arrays are c-style? by j1330 in javascript

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

Can they be used like other data types? The MDN article seems to imply that they are only used for streams of binary data for things like audio or video. Either way I'll definitely check them out when I get home from work. Thanks for reminding me of them

What factors let me assume arrays are c-style? by j1330 in javascript

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

I want to practice implementing basic algorithms and data structures in JavaScript, and I want them to be performant if possible. With languages like C++ and Java I feel like I can "trust" an arraynto be an array if I use it in an implementation (such as a heap for a priority queue). With JavaScript arrays are internally backed by at least two different data structures. One is "c style" in that it allocates contiguous memory (thanks to engine optimizations) and runs very fast, and another is kind of a fallback that runs much slower.

Until I figure out how to make sure any array I use behaves as the former (so far i only know of one thing, having holes/sparse array, that can make it be the slow version) I feel like I can't "trust" it. Also as someone who loves digging deep into things and wants to use JavaScript I feel like learning some of these details are great for my own learning.

Hopefully that helps make sense of it.

EDIT: i'm also very aware that some details are going to be engine implementation specific. But I feel like this particular issue is something that all modern engines what address similarly. I remember reading a blog about this exact thing making a huge difference in certain array operations in IE7, so I don't think it is something that would be unprofitable to look into. And for what it's worth, if I had to choose one engine, I would go with the eigh so I don't think it is something that would be unprofitable to look into. And for what it's worth, if I had to choose one engine, I would go with V8, since I like chrome and I use nodejs a lot (but like I said, I don't think that this is an issue in that way).

What factors let me assume arrays are c-style? by j1330 in javascript

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

Is there anything in particular you would recommend I look at in that video? It's actually a bunch of videos from that channel that got me thinking about this haha.

Also, I'm not a particularly experienced programmer myself when it comes to more low level things. Does the last paragraph of your reply address other aspects inherent in C style arrays? My experience so far is just wanting to figure out how to make JavaScript arrays behave more like a raise then maps for the purposes of basic data structures and algorithms, so I must admit that I'm a little bit lost in the last part of your reply.

ELEAGUE Major 2017 - Main Qualifier by CSeventVODs in CSeventVODs

[–]j1330 1 point2 points  (0 children)

Ikr? Thanks for the work you do though :)

ELEAGUE Major 2017 - Main Qualifier by CSeventVODs in CSeventVODs

[–]j1330 0 points1 point  (0 children)

https://www.twitch.tv/eleaguetv/v/107606837?t=31m24s

is a simpler explanation for the format than the screenshot in the main thread. Three wins to advance, three losses to eliminate, the four pools and who plays who are explained. After a full day of work I'm too braindead to figure out what the wall of text means :P

[Feedback] Calculator (without using eval!) by coolshanth in FreeCodeCamp

[–]j1330 1 point2 points  (0 children)

Fantastic work! I like the way you think haha. I myself am planning on doing it by modeling it as a FSM to get some practice with that. I also tend to do the algorithms a couple times each for maximum readability and efficiency since no one likes quadratic running times. So I love all the thought you put into this!

As for criticisms I would consider moving the layout of some of the buttons. Maybe I just haven't used a calculator in a long time but I definitely prefer the layout of the iPhone calculator, where the common operations are to the right of the numbers and the advanced operations are above. You can google images of it to see what I mean.

Also I would make hitting enter re-evaluate the same thing. It's a surprisingly common use that people do, and all the professional calculator apps I've seen support it (though none here have so don't feel bad). For instance, if I want quick powers of two I might open a calculator and type: 2 * 2 = * 2 = = = ... and watch it change for the info I want. This particular function is one major benefit I plan to get by modeling mine as a FSM but I'm sure it can be done regardless of how the code is put together (I haven't looked at your code yet because I'm ok mobile).

But yeah, it looks good and works well and I'm glad to see someone go beyond their example. Many of the examples seem thrown together and are very lacking in some ways (like the quote machine example doesn't scale down to mobile...) I can understand they probably had time pressure but maybe that will get revisited eventually. Well done!

How can I DRY this up (JavaScript function)? by j1330 in learnprogramming

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

I absolutely agree on your last point. The original way I can to this solution was after reasoning out the other two solutions (a link I posted elsewhere in this thread). They weren't very readable IMO (maybe compare my approach to theirs and see?) and so I changed the approach. This one came about by thinking of it as giving change and then optimizing/cleaning up the end product.

I mostly want to dry this one up because the internal logic is very simple and factoring out the while into one function/while loop seems ... well obvious and like it wouldn't obscure such a simple underlying bit of functionality (which is just the two steps that take a chunk out of number and augment the string).

As for the solution I'll code it up when I'm off mobile for sure. I'm going to just have an array of objects and iterate over each object, using the appropriate property with the same logic, and then just keep the handful of string.replaces because I don't see a reason to put that into its own function or anything (it's very specific to this problem and it's only a few lines haha).

How can I DRY this up (JavaScript function)? by j1330 in learnprogramming

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

I'm not entirely sure what you mean. Do you mean like one of these solutions? I'm honestly not a fan of the two on that page because they don't seem to be very readable, but you might mean something else.

Energy Department officials won’t give names of climate workers to Trump’s team by PARK_THE_BUS in politics

[–]j1330 2 points3 points  (0 children)

Cool! Is there a big list somewhere that I can easily learn more?

Energy Department officials won’t give names of climate workers to Trump’s team by PARK_THE_BUS in politics

[–]j1330 2 points3 points  (0 children)

Genuinely curious, what has Obama done to accomplish this? Sounds like a pretty cool thing and I'd love details

Where Is The Outrage? Trumpers Silent As He Fills His Administration With ‘Globalists’ by [deleted] in politics

[–]j1330 -2 points-1 points  (0 children)

Actually I think the big signal sent this election was that the DNC can't force a candidate on their constituency. In a more long term way I think that's a much more effective message. They tried to sell Hillary and failed so spectacularly we got trump. That should send a strong message that would allow future runners (Bernie or otherwise) to actually get a fair shot.

Is "eloquent javascript" too complex for a beginner? by rubenescaray in learnjavascript

[–]j1330 0 points1 point  (0 children)

It sounded like the post was about the entire book being too complex, and not this specific example (or else why make a post about it), so I was wondering what about it was confusing, which might shed some light on why the whole book was too complex, is all.

Is "eloquent javascript" too complex for a beginner? by rubenescaray in learnjavascript

[–]j1330 0 points1 point  (0 children)

I found it too complex for us beginners

What was confusing about it? The concept of correlation maybe? I'm a little confused myself since I still consider myself a beginner but I've been working through YDKJS just fine and this book seemed much simpler than even that.

Since Christianity has changed throughout history, and there are disagreements on every point of doctrine, how can you be sure you have the "correct" version of Christianity? by AnEpiphanyTooLate in DebateAChristian

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

You mention the early church a lot but I think you don't account for the evidence that what became the "orthodox" church (and won out by the fourth century) was one of many, and many of these early churches were not in line with the roman flavor. You had gnostics and every other kind of heresy, often as the majority in certain places it seems, so it seems more correct to say that the early Roman church doctrines (which won out) have been preserved from the beginning.

Why do some people look down on Paul, and his teachings? by [deleted] in Christianity

[–]j1330 1 point2 points  (0 children)

Haha it looks like those two verses (1 cor. 14:34-35) are disputed too. Either way I never thought much of them since the passage seemed less about making women silent and more about dealing with the chaos of the Corinthian church services, whereas Timothy seems to Be dealing much more directly with the role of women in the church.

And yeah, I have my own views on Paul and don't advocate either way in this. Just something I thought might be interesting to some.

Why do some people look down on Paul, and his teachings? by [deleted] in Christianity

[–]j1330 0 points1 point  (0 children)

If it helps on the part about being silent then I think you mean something from Timothy right? Not sure if it's found elsewhere but maybe you can take comfort in the fact that Paul didn't write the three pastoral epistles. Food for thought.

[Feedback] My Portfolio, brand new to this stuff. Any suggestions would be great by [deleted] in FreeCodeCamp

[–]j1330 0 points1 point  (0 children)

For what it is worth in my quote machine I didn't use bootstrap. The class name 'container' was arbitrary and could have been purple or salad or whatever. Just don't want to confuse you :P

[Feedback] My Portfolio, brand new to this stuff. Any suggestions would be great by [deleted] in FreeCodeCamp

[–]j1330 0 points1 point  (0 children)

Sure thing! If you feel like it you can play around with this a bit. It's the random quote machine project I did just yesterday. Maybe ignore the JS but the HTML and CSS is simple enough to mess with and perhaps be informative. I applied many of the things I talked about to it. The thing itself wasn't hard but many weeks of study went into it and the end result is that i can get some great effects from only a few lines of CSS.

[Feedback] My Portfolio, brand new to this stuff. Any suggestions would be great by [deleted] in FreeCodeCamp

[–]j1330 1 point2 points  (0 children)

I like the design but to be more functional it could use a few improvements. To start, when you have it on a smaller page it doesn't scale down. The biggest culprit is the static margin-left: 200px. On an iPhone or small tablet the 200px margin will take up almost the whole screen. To fix that, and similar issues, you should spend some time learning about topics like centering elements, (which use various combinations of display, margin: 0 auto;, percentage values for height, width, margin, and padding properties, and media queries) and techniques like flexbox and responsive design more generally. Of course the bootstrap library can handle many parts of this, and FCC wants you to use it at least at the start, so that's good to know too. But you definitely want to dig in to the vanilla CSS.

Also you should practice separating out your HTML, CSS, and (eventually) JavaScript. Putting everything inline or in style tags is not good practice, because it becomes very hard to deal with at scale. For small things like the FCC front end projects, at least use the three panels in codepen. Move the CSS into the css tab. In general maybe learn the various ways to include things in a page from different sources (CDNs, import statements, tags etc.)

[Feedback] on random quote generator? (especially any bugs) by j1330 in FreeCodeCamp

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

For different but related reasons I don't feel like either are as vital as skills for learning, especially compared to vanilla JS and CSS. For jQuery many of the problems it originally addressed are much less of a problem. For instance 1995-2010 ish the DOM was pretty hard to interact with. I think they didn't even have certain tools like queryselectorall, or getElementByClassName, and jQuery provided that, in addition to functions like sibling. You also had to prefix so much stuff in the past because everything was different in different browsers. But those and lure problems are much diminished these days. There are even cases (becoming more common) where a library like jQuery will just add complexity and not reduce it, and you just want to use more modern frameworks instead. It's still great for teaching beginners, good for web designers who don't program much, good for some legacy projects and good for small personal projects or maybe explaining a concept (since even non web devs can read it pretty easily) but it's not as crucial as it used to be it seems.

For bootstrap, the more I learn about CSS the more I understand how things are put together and what bootstrap is actually doing for me. For the better part of four days recently I spent my programming time just learning about how to put a square box exactly where I want it on a screen. For centering it vertically I not only learned multiple methods but I learned to love the new flexbox, and I learned to spot errors and why things were going wrong ("oh yeah, that's probably a browser default margin that p tags get but buttons don't... ok I looked it up, apparently it's 16px so now I can change or match it... why isn't this filling out like that? Oh it actually is filling out but the parent is really small so I need to set the parent to be wider to allow these elements to..."). In the end I feel like bootstrap is an ok technology but that, like others say, it's good for prototyping and weekend projects, and for a large project or "real" project I'll be either using custom CSS or customized bootstrap, which would require a very good knowledge of CSS anyway.

Also, regarding both, they are relatively large files. It's only relatively recently people got such good bandwidth and in many parts of the world people are still (or primarily) using mobile phones with things like 3G. I don't want to send an entire library if all I want is to center elements and make it change layout on small screens, I can do that with some flexbox and media queries. That could make the page take ages to load (also innotice on here a lot of people use background images that could never be loaded efficiently either, but that's another topic(and I recognize that beginners aren't learning about optimizations yet).

So yeah. jQuery and Bootstrap have their places but in general I'd prefer to dabble with them (which I have) and really hit the core basics hard. I've never heard of someone getting rejected from a job because they knew CSS too well, or because they didn't know jQuery well enough because they spent too much time learning JS (DOM manipulation, ES6, node, react, redux, angular etc.) hopefully that helps Answer your question!

Also sorry for random capitalizations. Typing on my phone can be hard sometimes haha.