Let's talk about unit tests and directory structure. If you're doing it right you're going to be creating at least one test file for every JavaScript file you create so it's a given that there are going to be quite a lot of tests. Where do you put all of these tests? There are basically 2 schools of thought here. In this post I'll explain the two theories and then put forth an argument for why you should be putting unit tests in your src folder.
0 Comments
I'm super excited right now. It's Saturday morning of memorial day weekend right, and yesterday I had an interview with a rapid growing music-related tech company. They have a really awesome office in the Chelsea market area of New York City. Everyone has a huge iMac at their desk along with a Macbook Pro (well you can choose but it seems like 99% of people prefer mac there). Oh by they way, your desk is a standing desk with power controls to adjust it up or down. As an Angular developer you get to use WebStorm (I'm assuming I would, the interviewer used IntelliJ which is basically just a more features / languages version of WebStorm). Tons of free snack, drinks, and a pretty cool espresso machine that I got a chance to use, a cool outdoor terrace, and ping pong tables all made it this seem like a surreal workplace. I even saw a little nook that had a Nintendo 64 set up with Goldeneye in it! But this post isn't about how great it would be to work at this company; it's about how the front-end teams of today and tomorrow can use principles from the Java era to craft seemingly bulletproof code. It was once said by the author of a programming book I can't remember right now that it's possible to do all of your coding without a mouse. He actually recommended taking the mouse away sometimes when you are pair programming for an "extra challenge" (and that's on top of his normal extra challenge of doing everything TDD style).
One of my favorite bloggers, Seth Godin, is an author and entrepreneurship coach who emphasizes making quality products that people want over mindless "marketing" tactics to get customers. This is one of his favorite quotes:
I woke up very hung over this morning and started thinking about how I was going to the solve the issue of button pressed states not working properly on touch devices in the corporate container app for my current work project. I had googled a lot for it already, but this time I decided to try to google for videos. I came across this video. Honestly, he doesn't talk much about touch device specific things here; it just has Touch Screen in the title because the actual project was meant to run on that giant touch panel on the left there in the video preview. However, I still enjoyed this video and liked getting inside of this guy's head. He reports directly tot he CEO of his company he's in charge of basically all aspects of building the software and getting it out so you know that he has successfully completed at least a few projects (although he admits that he is pretty new to AngularJS). Overall he gives some insight on thinking about custom directives (although he has a weird style where inside of the .directive() he just returns basically the equivalent of the link function, but nothing is labeled in the way you might be used to seeing directives). He also does some other weird things like using Coffeescript, Haml, and he talks about the yeoman seed project as if there's only one. hehe. But weirdness aside, it's a good video, and you should give it a watch.
|
AuthorThe posts on this site are written and maintained by Jim Lynch. About Jim...
Categories
All
Archives
March 2023
|