|
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. |
On August 14 2013 18:01 adwodon wrote:Show nested quote +On August 14 2013 17:43 spinesheath wrote: That kind of depends on the technology (for example WPF, MFC, Win32 or whatever that ancient stuff is called) you are using for your user interface, but generally I'd assume you can change styles for individual controls, yes. Yea its all Win32, I've not dared touch anything else, MFC looks a bit horrible. WPF looks mental but I hear if you can do it you can get some pretty swanky jobs, looks like a bitch to debug though and in my current job I've got very little excuse to learn .NET outside of writing some sample apps for our SDK. Figured it out in the end though  WPF is nice, I like it a lot. It's pretty hard to get your head wrapped around bindings at first (and all the explanations I could find are quite bad), but once you got that figured out it is relatively simple.
I think I used some Win32 years ago when I was a horrible programmer still. What little I can remember of it is pretty damn ugly...
|
Hi guys, I have a question about MatLab. I need to get a variable from a .m file so that I can use it in another file (the variable is changing over time). Can someone help me? I tried out a lot of stuff and used google ofc but nothing worked really...
|
What's the consensus for HTML5? Is it worth learning? How does it work when the website is data driven? Do you have to learn some other server side language to support server operations? Are there are good resources out there (books, online tutorials, etc) for learning HTML5? I know I can google that last part, which I have and am learning what I can, but I'd like to know what others' personal experiences are with learning or having learned it.
|
Question: I'm using Maven and java to write some tests.
I have a class in src/test/java and src/main/java The one in src/test/java imports from src/main/java Then I tried to have the class in src/main/java also use the one in src/test/java
When I tried to run this in eclipse just using testng, it worked. But then I tried to run in maven and it kept saying that my class in src/test/java did not exist.
Are you supposed to have tests depend on resources and never the other way around?
On August 15 2013 01:26 Saumure wrote: Hi guys, I have a question about MatLab. I need to get a variable from a .m file so that I can use it in another file (the variable is changing over time). Can someone help me? I tried out a lot of stuff and used google ofc but nothing worked really... Check out matlab's import function. http://www.mathworks.com/help/matlab/ref/import.html
Then tell me whether you need more help. Do you need to access the variable directly or can you create an object of a class? Can you pass the variable with a method?
If you already know how to import then I'm guessing you want to make the variable global so changes can be used instantly.
On August 15 2013 02:14 enigmaticcam wrote: What's the consensus for HTML5? Is it worth learning? How does it work when the website is data driven? Do you have to learn some other server side language to support server operations? Are there are good resources out there (books, online tutorials, etc) for learning HTML5? I know I can google that last part, which I have and am learning what I can, but I'd like to know what others' personal experiences are with learning or having learned it. You have to learn some server side language to complement it if you want to build a site yourself.
I have no idea what good resources are.
|
On August 15 2013 02:14 enigmaticcam wrote: What's the consensus for HTML5? Is it worth learning? How does it work when the website is data driven? Do you have to learn some other server side language to support server operations? Are there are good resources out there (books, online tutorials, etc) for learning HTML5? I know I can google that last part, which I have and am learning what I can, but I'd like to know what others' personal experiences are with learning or having learned it.
I'm a front end web developer and I use html basically every day at work. If you are interested in the front end of web design, I don't see how you could get around not knowing html. It isn't that hard to learn, at least in the basic sense (you don't have to memorize what all the elements do). It is an xml language, if that means anything. You can get a CMS that spits out html and css for you, without having much knowledge of either, but you'll be pretty limited in your customization options without knowing it.
Not 100% sure what you mean by a data driven website. If you mean one that interfaces with a database, there are lots of variations for that. Knowing PHP that can translate things into SQL is a pretty common thing (to interface with SQL databases), but there are other variations.
|
On August 15 2013 02:18 obesechicken13 wrote: Question: I'm using Maven and java to write some tests.
I have a class in src/test/java and src/main/java The one in src/test/java imports from src/main/java Then I tried to have the class in src/main/java also use the one in src/test/java
When I tried to run this in eclipse just using testng, it worked. But then I tried to run in maven and it kept saying that my class in src/test/java did not exist.
Are you supposed to have tests depend on resources and never the other way around?
As for tests it is my opinion that the only design choice that makes sense is to design your unit test classes to be optional. You should have build targets that don't build or run any tests. This makes for leaner and faster production releases. This way, your resources must not depend on any test classes.
Next thing: Eclipse and Maven integration is a funny story. I would recommend that you first set up your project to be Maven only, then use Eclipse's method to import existing Maven projects. In a perfect world, or if your project is small, it can work well. You'll have to post your pom.xml file so we can have a look at how you configured your Maven project.
I must warn you. If you want this to work well you might need a lot of patience before you get things to work the right way. My recommendation is to do away with Eclipse and forget about full IDE integration. In my experience it works better if you just let Maven work on its own. You'll have to spend a little more energy on setting up a comfortable programming environment and learning another IDE than Eclipse.
Eclipse is slow, buggy and never holds up to what it promises to do. It represents everything that is bad with JAVA.
|
On August 15 2013 06:35 one-one-one wrote: Eclipse is slow, buggy and never holds up to what it promises to do.
My thoughts exactly.
Also agree on the test part, nothing should ever depend on tests. It's both conceptually and practically bad.
|
On August 15 2013 06:35 one-one-one wrote:Show nested quote +On August 15 2013 02:18 obesechicken13 wrote: Question: I'm using Maven and java to write some tests.
I have a class in src/test/java and src/main/java The one in src/test/java imports from src/main/java Then I tried to have the class in src/main/java also use the one in src/test/java
When I tried to run this in eclipse just using testng, it worked. But then I tried to run in maven and it kept saying that my class in src/test/java did not exist.
Are you supposed to have tests depend on resources and never the other way around?
As for tests it is my opinion that the only design choice that makes sense is to design your unit test classes to be optional. You should have build targets that don't build or run any tests. This makes for leaner and faster production releases. This way, your resources must not depend on any test classes. Next thing: Eclipse and Maven integration is a funny story. I would recommend tha you first set up your project to be Maven only, then use Eclipse's method to import existing Maven projects. In a perfect world, or if your project is small, it can work well. You'll have to post your pom.xml file so we can have a look at how you configured your Maven project. I must warn you. If you want this to work well you might need a lot of patience before you get things to work the right way. My recommendation is to do away with Eclipse and forget about full IDE integration. In my experience it works better if you just let Maven work on its own. You'll have to spend a little more energy on setting up a comfortable programming environment and learning another IDE than Eclipse. Eclipse is slow, buggy and never holds up to what it promises to do. It represents everything that is bad with JAVA.
What? ... the java hate is just so overdone.
I don't think that you necessarily need to setup your project to be maven only, sure it would eliminate the issue because well... you wouldn't even be running the tests with the testng plugin. But regardless of what people try to say, eclipse is a great ide and works well when you understand what its trying to do.
The reason that you are experiencing the issues is because of the differences of maven and eclipse. Maven is a full build tool, but eclipse tries to circumvent some of the lifecycles and use their own compilation methods. m2e has come along way but its still not perfect. When setting up the classpath for eclipse it includes all of your dependencies which gives you a false sense of working.
If you think about the maven lifecycle, I don't think what you are talking about makes a lot of sense. Sure it makes sense for your test resources to be able to access your source resources, that's the whole point of testing. When you are compiling your code thought in the compile phase it hasn't even tried to process the test files yet.
After the tests are run, that's about the extent that those classes get to exist. When you are packaging your project (jar or war), the test sources won't even be included in the package. They are even compiled to separate places (target/classes vs target/test-clasess)
|
Thanks guys
On August 15 2013 02:18 obesechicken13 wrote:Question: I'm using Maven and java to write some tests. I have a class in src/test/java and src/main/java The one in src/test/java imports from src/main/java Then I tried to have the class in src/main/java also use the one in src/test/java When I tried to run this in eclipse just using testng, it worked. But then I tried to run in maven and it kept saying that my class in src/test/java did not exist. Are you supposed to have tests depend on resources and never the other way around? Show nested quote +On August 15 2013 01:26 Saumure wrote: Hi guys, I have a question about MatLab. I need to get a variable from a .m file so that I can use it in another file (the variable is changing over time). Can someone help me? I tried out a lot of stuff and used google ofc but nothing worked really... Check out matlab's import function. http://www.mathworks.com/help/matlab/ref/import.htmlThen tell me whether you need more help. Do you need to access the variable directly or can you create an object of a class? Can you pass the variable with a method? If you already know how to import then I'm guessing you want to make the variable global so changes can be used instantly. Show nested quote +On August 15 2013 02:14 enigmaticcam wrote: What's the consensus for HTML5? Is it worth learning? How does it work when the website is data driven? Do you have to learn some other server side language to support server operations? Are there are good resources out there (books, online tutorials, etc) for learning HTML5? I know I can google that last part, which I have and am learning what I can, but I'd like to know what others' personal experiences are with learning or having learned it. You have to learn some server side language to complement it if you want to build a site yourself. I have no idea what good resources are.
Code academy and coursers have html5 courses.
|
Hey! So I just passed the OCJAP7 exam (java associate) today. Coming from little to no cs knowledge 6 months ago, I'm feeling good 
However, I know that I'm still missing out on a lot of java stuff. There are still some areas I want to look into to kind of round out my knowledge of the language:
- Networking - Serialization - Annotation - (Not entirely java-centric) Database relations...SQL, nosql, relational algebra and all that etc - And of course...lambdas. those look cool
Any other things you guys recommend?
Also, I want to drill TDD into myself from the start. Any recommendations on books or other resources?
|
On August 15 2013 02:14 enigmaticcam wrote: What's the consensus for HTML5? Is it worth learning? How does it work when the website is data driven? Do you have to learn some other server side language to support server operations? Are there are good resources out there (books, online tutorials, etc) for learning HTML5? I know I can google that last part, which I have and am learning what I can, but I'd like to know what others' personal experiences are with learning or having learned it. HTML takes no time to learn, it's dead simple. Just search on google, find some decent tutorials and you're green.
If you want to make a modern web site, especially if it's data driven, you definitely need to know a server-side language as well. Which one you go for is up to you, here's some options: PHP, ASP.NET, Ruby on rails, Django. node.js.
|
On August 15 2013 15:44 Tobberoth wrote:Show nested quote +On August 15 2013 02:14 enigmaticcam wrote: What's the consensus for HTML5? Is it worth learning? How does it work when the website is data driven? Do you have to learn some other server side language to support server operations? Are there are good resources out there (books, online tutorials, etc) for learning HTML5? I know I can google that last part, which I have and am learning what I can, but I'd like to know what others' personal experiences are with learning or having learned it. HTML takes no time to learn, it's dead simple. Just search on google, find some decent tutorials and you're green. If you want to make a modern web site, especially if it's data driven, you definitely need to know a server-side language as well. Which one you go for is up to you, here's some options: PHP, ASP.NET, Ruby on rails, Django. node.js. Is he asking about HTML5 or just HTML?
|
On August 15 2013 14:38 KurtistheTurtle wrote:Hey! So I just passed the OCJAP7 exam (java associate) today. Coming from little to no cs knowledge 6 months ago, I'm feeling good  However, I know that I'm still missing out on a lot of java stuff. There are still some areas I want to look into to kind of round out my knowledge of the language: - Networking - Serialization - Annotation - (Not entirely java-centric) Database relations...SQL, nosql, relational algebra and all that etc - And of course...lambdas. those look cool Any other things you guys recommend? Also, I want to drill TDD into myself from the start. Any recommendations on books or other resources?
You definitively need to learn all of that, though java might not be the best language to learn lambdas in. Scheme is by far the best for that, but since you're new to programming, I guess you probably want to stick to java for now (lambdas are coming soon in version 8).
A must read for any serous java dev: http://www.amazon.com/Effective-Java-Edition-Joshua-Bloch/dp/0321356683
Seriously, learn this book by heart, your future collages will thank you for it.
The best book to learn TDD that I know of is: http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627
It's about TDD practice in general, but I'm sure that you'll appreciate that all the examples are in java. If this is too involved for you there are other books about TDD in java, even from this year. An quick amazon search will net you good results
|
United States10328 Posts
I have a pretty general question about OOP (but more specifically Java, since maybe strong typing and single-inheritance make a difference here?)
Say I have class A containing something of class X, and a subclass A1 of A which must contain a subclass X1 of X. What's a good way of structuring this?
I ran into this in two separate occasions: once, I wanted to use the Builder pattern in both class A and its subclass A1. Naively, you could have A1Builder extend ABuilder, but then to actually build an object of type A1, you have to do something like ( (A1Builder) new A(ABuilder(z1).withZ2(z2).withZ3(z3)) ).withZ4(z4).build() which is pretty ugly.
There are some solutions suggested here which seem ok, but sort of messy.
On the second occasion, I had some classes (A superclass A1, A2, ...) which contain both backend model stuff and frontend Swing stuff (don't ask, I didn't write it ) and wanted to separate these out so that A contains a "data wrapper"/"transport object" of type X, A1 contains a transport object of type X1, etc. But then if I give A an instance of X as an instance variable, the only way it seems that I could extract an X1 out of A1 is to do an unchecked cast somewhere inside A1 from the X into the X1; that leaves a bad taste in my mouth, but it seems like Java just isn't equipped to do that kind of thing? Or am I missing something?
|
It's sitting on my desk right now! First I want to get through the rest of one of my intro to java books so I get some guided gui and networking practice in, then I'm gonna hop around in Code Complete. Maybe by then I'll be able to understand what effective java is actually saying :p
Since you recommended effective java, I'll definitely go with your recommendation on this one too. Thanks!
|
On August 15 2013 15:53 WolfintheSheep wrote:Show nested quote +On August 15 2013 15:44 Tobberoth wrote:On August 15 2013 02:14 enigmaticcam wrote: What's the consensus for HTML5? Is it worth learning? How does it work when the website is data driven? Do you have to learn some other server side language to support server operations? Are there are good resources out there (books, online tutorials, etc) for learning HTML5? I know I can google that last part, which I have and am learning what I can, but I'd like to know what others' personal experiences are with learning or having learned it. HTML takes no time to learn, it's dead simple. Just search on google, find some decent tutorials and you're green. If you want to make a modern web site, especially if it's data driven, you definitely need to know a server-side language as well. Which one you go for is up to you, here's some options: PHP, ASP.NET, Ruby on rails, Django. node.js. Is he asking about HTML 5 or just HTML? HTML5 is HTML. Why would he learn HTML4 when HTML5 is an official standard? I mean, it's not like people ask "Is it worth learning .NET 2.0?". If you learn .NET, you learn .NET, and you obviously learn the latest version.
|
On August 15 2013 15:58 ]343[ wrote:I have a pretty general question about OOP (but more specifically Java, since maybe strong typing and single-inheritance make a difference here?) Say I have class A containing something of class X, and a subclass A1 of A which must contain a subclass X1 of X. What's a good way of structuring this? I ran into this in two separate occasions: once, I wanted to use the Builder pattern in both class A and its subclass A1. Naively, you could have A1Builder extend ABuilder, but then to actually build an object of type A1, you have to do something like ( (A1Builder) new A(ABuilder(z1).withZ2(z2).withZ3(z3)) ).withZ4(z4).build() which is pretty ugly. There are some solutions suggested here which seem ok, but sort of messy. On the second occasion, I had some classes (A superclass A1, A2, ...) which contain both backend model stuff and frontend Swing stuff (don't ask, I didn't write it  ) and wanted to separate these out so that A contains a "data wrapper"/"transport object" of type X, A1 contains a transport object of type X1, etc. But then if I give A an instance of X as an instance variable, the only way it seems that I could extract an X1 out of A1 is to do an unchecked cast somewhere inside A1 from the X into the X1; that leaves a bad taste in my mouth, but it seems like Java just isn't equipped to do that kind of thing? Or am I missing something? You could probably accomplish what you want using some combination of generic parameters, but it sounds like a rather complex inheritance situation that should generally be avoided. If A1 can be used *only* with X's of type X1, are they really a separate entity? If they are, perhaps A should be defined as class A<T extends X> and A1 as class A1 extends A<X1> But yeah, it seems very strange to me to want such a more specific type like that in the subclass, although it could just be the very generic description preventing me from seeing what's actually happening
|
Actually, I'm gonna go give Effective Java another shot right now before bed. Might actively read it tomorrow if I grasp more this time
|
OK calling CSS men!
I'm working on a drop down type menu. Its basically some stacked Divs that then drop down and unstack when you hover over the top one with transitions.
I got it to work but then when you slide your mouse down the menu they wont stay out. I made this all from scratch so its a bit wierd.
Here is the html: + Show Spoiler +
And here is the CSS: + Show Spoiler +![[image loading]](http://i.imgur.com/w54Eqol.png) ^This is just my divs ![[image loading]](http://i.imgur.com/nPJ11En.png) ^These are to try to keep the menu open when you mouse down it. I can get it to stay open when you mouse over the first div, and the second div, but when you go over the third one the 2nd one hides.
Anyone help me out or suggest a much better way to do this?
HERE is the little project if you wanna help me and see my cool menu.
|
On August 15 2013 16:22 Tobberoth wrote:Show nested quote +On August 15 2013 15:53 WolfintheSheep wrote:On August 15 2013 15:44 Tobberoth wrote:On August 15 2013 02:14 enigmaticcam wrote: What's the consensus for HTML5? Is it worth learning? How does it work when the website is data driven? Do you have to learn some other server side language to support server operations? Are there are good resources out there (books, online tutorials, etc) for learning HTML5? I know I can google that last part, which I have and am learning what I can, but I'd like to know what others' personal experiences are with learning or having learned it. HTML takes no time to learn, it's dead simple. Just search on google, find some decent tutorials and you're green. If you want to make a modern web site, especially if it's data driven, you definitely need to know a server-side language as well. Which one you go for is up to you, here's some options: PHP, ASP.NET, Ruby on rails, Django. node.js. Is he asking about HTML 5 or just HTML? HTML5 is HTML. Why would he learn HTML4 when HTML5 is an official standard? I mean, it's not like people ask "Is it worth learning .NET 2.0?". If you learn .NET, you learn .NET, and you obviously learn the latest version. Because quite a few people learned HTML before HTML5 was even on the drawing boards...
|
|
|
|