Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks.
- Try to replace loops with indexing, much faster and easier, loops should be the last option imo, built in functions or index are the way to go
If you ignore all other advice, heed this. In the short run, it will merely make your code shorter and easier to read. In the long run, MATLAB functions tend to start taking days or weeks after the scope starts getting out of control, so thinking in terms of speed of computation early means you do not have to relearn MATLAB at a later point.
Another +1 for avoiding loops. Almost anytime you are tempted to use a loop in matlab, theres some matrix operation which is 1000x faster, is cleaner code, and makes you look more pro.
On January 08 2016 06:36 travis wrote: I already read that. I think I get a grasp of how it works, for the most part. And why, for the most part. I just don't see the advantage of doing it this way instead of just having a keyword. It actually seems like it's making it more complicated instead of less, which is something I haven't seen in python so far.
Maybe this is a question I will need to ask myself in 6 months.
You think this is complicated? PHP has bothselfandthis. And in JavaScript you often see stuff like that:
here's a question why do people bother with programs like bootstrap why is that better than just writing your html/css yourself? Or is there something more that it does ?
Usually just provides a lot of out of the box functionality without having to do much work, it'll get you results faster than figuring everything out yourself.
We use bootstrap at my work because it let's us do styling well but quickly, and we can spend more time on the actual business logic and implementing new functionality.
I have read several posts that say that unless you put in the extra work to customize the code, "all bootstrap sites look the same". Is there any truth to that?
Things like bootstrap and jQuery are useful because of many reasons:
1. Uniform way of styling/scripting across projects. 2. Lots of help available online. 3. Lets you avoid a lot of tarpits (mainly cross-browser functionality and legacy browser support). Also, since they're so popular they've been tested extensively and already fixed stuff you didn't even know could be a problem. 4. Easier to find new people for the project (higher chance of finding someone who has already worked with those frameworks than someone who'll pick up your own stuff quickly enough without applying additional burden to the rest of the team). 5. Huge number of "out-of-the-box" features.
Just to name a few.
Although we're currently debating switching from bootstrap to foundation all of the above still applies.
Here's a brief tutorial on how grid frameworks work (and why people use them to develop front-end fast across mobile and desktop):
On January 09 2016 01:44 travis wrote: I have read several posts that say that unless you put in the extra work to customize the code, "all bootstrap sites look the same". Is there any truth to that?
Yeah, basic bootstrap sites have very common appearances, but it's really simple to customize too.
On January 09 2016 01:44 travis wrote: I have read several posts that say that unless you put in the extra work to customize the code, "all bootstrap sites look the same". Is there any truth to that?
Yeah, basic bootstrap sites have very common appearances, but it's really simple to customize too.
There's actually nothing wrong with that. The design is simple yet good looking so even the sites with basic bootstrap look well. Also, it's good for the UX since the users get accustomed to the elements, don't have to look for things and instantly know what's what.
Anyway, like it was mentioned, it's really easy to customize bootstrap to suit your needs (you can even do it on their website and download already modified code). You can get all the matching colors and proper stuff here and use it to make a really nice looking layout with bootstrap.
Might be a bit off topic or at least tangential, but does anyone have any ideas about marketing a website to letsplayers and letsplay viewers?
I've launched my private project LetsPlayDB into essentially open beta yesterday, but I'm still unsure on how to get the initial boost I need to take off. Without letsplayers, people won't bother to search. Without people to search, letsplayers won't sign up. I've posted it to /r/letsplay and got a few channels to sign up, but by far not enough.
For those interested, the website is done in Node.JS using Express - my first ever Node.JS project. Backend is MongoDB, also a first for me. Frontend is of course using bootstrap, since I'm not a webdesigner, and a tiny bit of AngularJS - not a huge fan of AngularJS so far, it seems to be the same as jquery ui widgets, just with added syntax, but it seems to do it's job.
On January 09 2016 16:12 Morfildur wrote: Might be a bit off topic or at least tangential, but does anyone have any ideas about marketing a website to letsplayers and letsplay viewers?
I've launched my private project LetsPlayDB into essentially open beta yesterday, but I'm still unsure on how to get the initial boost I need to take off. Without letsplayers, people won't bother to search. Without people to search, letsplayers won't sign up. I've posted it to /r/letsplay and got a few channels to sign up, but by far not enough.
For those interested, the website is done in Node.JS using Express - my first ever Node.JS project. Backend is MongoDB, also a first for me. Frontend is of course using bootstrap, since I'm not a webdesigner, and a tiny bit of AngularJS - not a huge fan of AngularJS so far, it seems to be the same as jquery ui widgets, just with added syntax, but it seems to do it's job.
Angular starts to shine when you have a 2-system setup. Where one system has the primary db and does all the heavy lifting but doesn't really have a front and the other one only has db containing some user data and very basic controllers and is nothing more than a front where you use angular to display stuff you get from the other system.
This is actually pretty neat for front/back-end separation and it much reduces the load on your system (since the back-end stuff is set up to only receive json and only from ip's where your front-facing systems reside). All the front-facing systems really do is send request to the back-end system, get json in response and use angular to display it. Additional security is nice too.
So last week we got the green light to start fresh with the new version of our website, and today we had a database design meeting. I'm excited that we are moving from a heavily modded and unupgradable CakePHP 1.something, weird ajax, some sort of Symfony, bootstrap AND random SASS, jQuery, and PHP 5.3 all run on composer and compass to Symfony 3, PHP7, AdminLTE/Bootstrap, bower/gulp, and maybe nginx.
The admin section of prod alone is a nightmare to debug, as the way it's setup is such that all debugging is a pain (tail -F /var/log/httpd/error_log) and called pages cannot execute JS, which means all the control JS needs to be in the calling document, not the return result. It's so dumb how it's currently done.
Add to that the fact that we outsourced the development of the mobile site to another company and they royally fucked it up, and what we get is a very happy team of developers. Going through the DB today and saying "yes we can axe this 13gb table" was awesome.
On January 12 2016 10:59 tofucake wrote: So last week we got the green light to start fresh with the new version of our website, and today we had a database design meeting. I'm excited that we are moving from a heavily modded and unupgradable CakePHP 1.something, weird ajax, some sort of Symfony, bootstrap AND random SASS, jQuery, and PHP 5.3 all run on composer and compass to Symfony 3, PHP7, AdminLTE/Bootstrap, bower/gulp, and maybe nginx.
The admin section of prod alone is a nightmare to debug, as the way it's setup is such that all debugging is a pain (tail -F /var/log/httpd/error_log) and called pages cannot execute JS, which means all the control JS needs to be in the calling document, not the return result. It's so dumb how it's currently done.
Add to that the fact that we outsourced the development of the mobile site to another company and they royally fucked it up, and what we get is a very happy team of developers. Going through the DB today and saying "yes we can axe this 13gb table" was awesome.
That's cool. Let me know if you need any help with Symfony. For a year now most of the projects our company is doing are in Symfony 2.7+ and PHP 5.5+. It's a pleasure to work with it.
On January 08 2016 05:50 travis wrote: I have a couple questions about the commonly seen "self" parameter in python
It seems to have the same purpose as "this" in java. except from what I read, self isn't actually a keyword, so it can be anything
so a couple questions I have - is this parameter required in all methods you write in python? is this parameter basically just saying "from now on this is how this method can refer to itself" and finally - why? why not just use "this" like in java?
It is convention. You can use "this" all you like, but it'd be bad practice in python.
Python didn't just use "self" to be cool to distinguish itself from java -some OO languages use this, others self. This deviates all the way back to two of the first OO programming languages - Simula (this), smalltalk (self). A bit more complicated than that, and I'm not too knowledgable about it either, but yeah!
On January 12 2016 10:59 tofucake wrote: So last week we got the green light to start fresh with the new version of our website, and today we had a database design meeting. I'm excited that we are moving from a heavily modded and unupgradable CakePHP 1.something, weird ajax, some sort of Symfony, bootstrap AND random SASS, jQuery, and PHP 5.3 all run on composer and compass to Symfony 3, PHP7, AdminLTE/Bootstrap, bower/gulp, and maybe nginx.
The admin section of prod alone is a nightmare to debug, as the way it's setup is such that all debugging is a pain (tail -F /var/log/httpd/error_log) and called pages cannot execute JS, which means all the control JS needs to be in the calling document, not the return result. It's so dumb how it's currently done.
Add to that the fact that we outsourced the development of the mobile site to another company and they royally fucked it up, and what we get is a very happy team of developers. Going through the DB today and saying "yes we can axe this 13gb table" was awesome.
Been there, done that. End product was worse than the previous product.
In my previous company we wanted to move away from the old frontend, which was essentially entirely custom made. The new project was supposed to be all OOP, SOA, TDD and stuff. I was only involved in the latter parts of the rework, but essentially the new website was slow as hell, the structure was even more confusing since everything was configurable and the UI that was supposed to be identical to the old ended up much less userfriendly. The rework too 6 developers about a full year, if not a bit more, and for me the final product was unacceptable with page loading speeds in the range of one second for the simpler pages - after the extended 10 person team, the part where I got involved, spent two weeks optimizing everything, apart from the underlying Kohana framework which we weren't allowed to fix as to maintain compatibility to future updates.
I switched to my current company, for which I worked a few years back, on the promise of scrapping the old websites and creating something new. The old pages were basically procedural with all the functions in a file literally called functions.php. I came in when the one developer plus two student assistants already laid most of the foundation and I mostly had to add some of the more complex stuff like payment connectors and such. The new product is using zend framework 2 running on the azure cloud with lots of factories and stuff - and it's ugly, slow (page loading speed of 2s and more) and big parts of the code are huge messes. Launch is on the first of February and I wouldn't use the product in it's current state even if the stuff we're selling was free.
I think scrapping old stuff and creating it anew is overrated. It's fun though, I do it with my private projects all the time, which is one reason why 99% of them never see the light of day.
On January 12 2016 10:59 tofucake wrote: So last week we got the green light to start fresh with the new version of our website, and today we had a database design meeting. I'm excited that we are moving from a heavily modded and unupgradable CakePHP 1.something, weird ajax, some sort of Symfony, bootstrap AND random SASS, jQuery, and PHP 5.3 all run on composer and compass to Symfony 3, PHP7, AdminLTE/Bootstrap, bower/gulp, and maybe nginx.
The admin section of prod alone is a nightmare to debug, as the way it's setup is such that all debugging is a pain (tail -F /var/log/httpd/error_log) and called pages cannot execute JS, which means all the control JS needs to be in the calling document, not the return result. It's so dumb how it's currently done.
Add to that the fact that we outsourced the development of the mobile site to another company and they royally fucked it up, and what we get is a very happy team of developers. Going through the DB today and saying "yes we can axe this 13gb table" was awesome.
Been there, done that. End product was worse than the previous product.
In my previous company we wanted to move away from the old frontend, which was essentially entirely custom made. The new project was supposed to be all OOP, SOA, TDD and stuff. I was only involved in the latter parts of the rework, but essentially the new website was slow as hell, the structure was even more confusing since everything was configurable and the UI that was supposed to be identical to the old ended up much less userfriendly. The rework too 6 developers about a full year, if not a bit more, and for me the final product was unacceptable with page loading speeds in the range of one second for the simpler pages - after the extended 10 person team, the part where I got involved, spent two weeks optimizing everything, apart from the underlying Kohana framework which we weren't allowed to fix as to maintain compatibility to future updates.
I switched to my current company, for which I worked a few years back, on the promise of scrapping the old websites and creating something new. The old pages were basically procedural with all the functions in a file literally called functions.php. I came in when the one developer plus two student assistants already laid most of the foundation and I mostly had to add some of the more complex stuff like payment connectors and such. The new product is using zend framework 2 running on the azure cloud with lots of factories and stuff - and it's ugly, slow (page loading speed of 2s and more) and big parts of the code are huge messes. Launch is on the first of February and I wouldn't use the product in it's current state even if the stuff we're selling was free.
I think scrapping old stuff and creating it anew is overrated. It's fun though, I do it with my private projects all the time, which is one reason why 99% of them never see the light of day.
+1 - rewrites are definitely.. interesting.
The problem I have with them most of the time is the fallacy that it will be easier to understand, combined with the failure to understand the current product. If you can't dive in and figure out the current one, I've never been quite certain how one thinks they will rewrite it and get it correct.
On January 09 2016 16:12 Morfildur wrote: For those interested, the website is done in Node.JS using Express - my first ever Node.JS project. Backend is MongoDB, also a first for me. Frontend is of course using bootstrap, since I'm not a webdesigner, and a tiny bit of AngularJS - not a huge fan of AngularJS so far, it seems to be the same as jquery ui widgets, just with added syntax, but it seems to do it's job.
You are not using any Angular features (directives like ng-repeat, ng-model for example). Right now its just a container for standard jQuery. See “Thinking in AngularJS” if I have a jQuery background? As you said it does its job, but if you want some input on how to get there, I could give you some pointers.