|
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 October 16 2016 23:16 RoomOfMush wrote: I would like to write a user manual to a piece of software but I am not quite sure what kind of software / framework I am going to use. I would like to get some recommendations if possible.
What I need is something like a small wiki. Platform independent, with hyperlinks to important topics, a table of content, search function would be nice; all the standard quality-of-life features we have nowadays. I would also like to generate this manual automatically; ideally programmatically. I would also like to open this user manual from inside the java application.
I was thinking an HTML solution would be great for that. I could have the application start a browser and display the manual. Does anybody know of some tool / framework / toolkit / software / etc that can help me? www.doxygen.org ?
|
On October 16 2016 23:30 Manit0u wrote: It seems that what you need could easily be done with just a bit of html and js. Alternatively, there should be software that converts *doc comments to an html file serving as your documentation. I'm sure it's true for PHPDoc and RDoc comments so it should be available for Java and other languages. Yeah, but I dont want to generate the HTML and js files myself. It would be nice if there was already a framework for that which I can simply feed with the actual raw text content and it automatically generates tables of content, indices, search functionality, hyperlinks, etc.
On October 16 2016 23:50 iaretehnoob wrote:Show nested quote +On October 16 2016 23:16 RoomOfMush wrote: I would like to write a user manual to a piece of software but I am not quite sure what kind of software / framework I am going to use. I would like to get some recommendations if possible.
What I need is something like a small wiki. Platform independent, with hyperlinks to important topics, a table of content, search function would be nice; all the standard quality-of-life features we have nowadays. I would also like to generate this manual automatically; ideally programmatically. I would also like to open this user manual from inside the java application.
I was thinking an HTML solution would be great for that. I could have the application start a browser and display the manual. Does anybody know of some tool / framework / toolkit / software / etc that can help me? www.doxygen.org ? That looks like it generates code documentation, right? I need something to generate an actual user manual for people who dont understand how to use the software or those who want more detailed information about the inner workings (explanations for algorithms, etc).
|
On October 17 2016 00:42 RoomOfMush wrote:Show nested quote +On October 16 2016 23:30 Manit0u wrote: It seems that what you need could easily be done with just a bit of html and js. Alternatively, there should be software that converts *doc comments to an html file serving as your documentation. I'm sure it's true for PHPDoc and RDoc comments so it should be available for Java and other languages. Yeah, but I dont want to generate the HTML and js files myself. It would be nice if there was already a framework for that which I can simply feed with the actual raw text content and it automatically generates tables of content, indices, search functionality, hyperlinks, etc. Show nested quote +On October 16 2016 23:50 iaretehnoob wrote:On October 16 2016 23:16 RoomOfMush wrote: I would like to write a user manual to a piece of software but I am not quite sure what kind of software / framework I am going to use. I would like to get some recommendations if possible.
What I need is something like a small wiki. Platform independent, with hyperlinks to important topics, a table of content, search function would be nice; all the standard quality-of-life features we have nowadays. I would also like to generate this manual automatically; ideally programmatically. I would also like to open this user manual from inside the java application.
I was thinking an HTML solution would be great for that. I could have the application start a browser and display the manual. Does anybody know of some tool / framework / toolkit / software / etc that can help me? www.doxygen.org ? That looks like it generates code documentation, right? I need something to generate an actual user manual for people who dont understand how to use the software or those who want more detailed information about the inner workings (explanations for algorithms, etc). WordPress? Or wiki? Both have some of the features you're describing. But it's still a bit vague as to your actual requirements.
|
On October 17 2016 00:42 RoomOfMush wrote:Show nested quote +On October 16 2016 23:30 Manit0u wrote: It seems that what you need could easily be done with just a bit of html and js. Alternatively, there should be software that converts *doc comments to an html file serving as your documentation. I'm sure it's true for PHPDoc and RDoc comments so it should be available for Java and other languages. Yeah, but I dont want to generate the HTML and js files myself. It would be nice if there was already a framework for that which I can simply feed with the actual raw text content and it automatically generates tables of content, indices, search functionality, hyperlinks, etc. Show nested quote +On October 16 2016 23:50 iaretehnoob wrote:On October 16 2016 23:16 RoomOfMush wrote: I would like to write a user manual to a piece of software but I am not quite sure what kind of software / framework I am going to use. I would like to get some recommendations if possible.
What I need is something like a small wiki. Platform independent, with hyperlinks to important topics, a table of content, search function would be nice; all the standard quality-of-life features we have nowadays. I would also like to generate this manual automatically; ideally programmatically. I would also like to open this user manual from inside the java application.
I was thinking an HTML solution would be great for that. I could have the application start a browser and display the manual. Does anybody know of some tool / framework / toolkit / software / etc that can help me? www.doxygen.org ? That looks like it generates code documentation, right? I need something to generate an actual user manual for people who dont understand how to use the software or those who want more detailed information about the inner workings (explanations for algorithms, etc).
The doxygen author writes in his introduction that the website you are browsing there is built with doxygen.
|
On October 17 2016 00:42 RoomOfMush wrote:Show nested quote +On October 16 2016 23:30 Manit0u wrote: It seems that what you need could easily be done with just a bit of html and js. Alternatively, there should be software that converts *doc comments to an html file serving as your documentation. I'm sure it's true for PHPDoc and RDoc comments so it should be available for Java and other languages. Yeah, but I dont want to generate the HTML and js files myself. It would be nice if there was already a framework for that which I can simply feed with the actual raw text content and it automatically generates tables of content, indices, search functionality, hyperlinks, etc. Show nested quote +On October 16 2016 23:50 iaretehnoob wrote:On October 16 2016 23:16 RoomOfMush wrote: I would like to write a user manual to a piece of software but I am not quite sure what kind of software / framework I am going to use. I would like to get some recommendations if possible.
What I need is something like a small wiki. Platform independent, with hyperlinks to important topics, a table of content, search function would be nice; all the standard quality-of-life features we have nowadays. I would also like to generate this manual automatically; ideally programmatically. I would also like to open this user manual from inside the java application.
I was thinking an HTML solution would be great for that. I could have the application start a browser and display the manual. Does anybody know of some tool / framework / toolkit / software / etc that can help me? www.doxygen.org ? That looks like it generates code documentation, right? I need something to generate an actual user manual for people who dont understand how to use the software or those who want more detailed information about the inner workings (explanations for algorithms, etc).
If you don't want the code documentation but rather the use-cases then I guess you'll need some UML diagrams for the functionality and such. If you're working using Agile you can simply turn user stories into diagrams, base your program off of that and then have it also serve as a manual.
|
Has anyone tried to go to work in the US as a software engineer? Is it difficult to get a visa and job? I've been in the UK for 5 years, but rain is just too much.. especially in summer. I'm just checking my options now.
|
Hyrule18967 Posts
US visas are hard to get unless you have a sponsor. Getting a job isn't too hard though.
|
On October 17 2016 06:52 tofucake wrote: US visas are hard to get unless you have a sponsor. Getting a job isn't too hard though.
So is the idea to get a job which may also mean a sponsor? How does interview work then? Is it via Skype? Obviously, you don't have a visa unless they give you temporary one for interview. :D
|
On October 15 2016 16:38 Blisse wrote: Guys I feel really stupid but how does the coin change problem work? I've been thinking about it the last 3 hours and I think my brain is fried... I don't understand how you get to breaking it into solutions not containing coin X and solutions containing coin X.
Also follow-up, what happens if you introduce same value denominations? Like your set of coins is {1a, 1b, 5, 10}.
Also does the solution vary for permutations of coins? Ugh my head.
Are you confused about dynamic programming or this question specifically?
> I don't understand how you get to breaking it into solutions not containing coin X and solutions containing coin X.
Could you solve a different dynamic programming problem, like say edit distance?
|
On October 15 2016 16:38 Blisse wrote: Guys I feel really stupid but how does the coin change problem work? I've been thinking about it the last 3 hours and I think my brain is fried... I don't understand how you get to breaking it into solutions not containing coin X and solutions containing coin X.
Also follow-up, what happens if you introduce same value denominations? Like your set of coins is {1a, 1b, 5, 10}.
Also does the solution vary for permutations of coins? Ugh my head.
http://www.geeksforgeeks.org/dynamic-programming-set-7-coin-change/
Google is your friend.
|
On October 16 2016 04:29 Blisse wrote:Show nested quote +On October 15 2016 17:32 Acrofales wrote:On October 15 2016 16:38 Blisse wrote: Guys I feel really stupid but how does the coin change problem work? I've been thinking about it the last 3 hours and I think my brain is fried... I don't understand how you get to breaking it into solutions not containing coin X and solutions containing coin X.
Also follow-up, what happens if you introduce same value denominations? Like your set of coins is {1a, 1b, 5, 10}.
Also does the solution vary for permutations of coins? Ugh my head. Too lazy to google. What is the coin change problem? Is it simply the question of what change to give to a customer to minimize number of coins? If so, I don't get the problem you're having. Or are you working on some variation where you want all permutations? It's the one where given a set of coins and a target value, given an infinite amount of each coin how many ways can you use the coins to reach the target value. It's the dynamic programming problem. I don't understand the logic of it. Sorry, missed your post.
As people have now answered: do you understand DP in general, and it's the specifics of this problem that you don't get? Here is a good primer on DP in general: https://www.topcoder.com/community/data-science/data-science-tutorials/dynamic-programming-from-novice-to-advanced/
It uses the simpler version of the coin problem (which I alluded to earlier). However, it uses that as a way to explain dynamic programming, and you should be able to see how you can use the method to achieve a solution to the more general problem.
|
On October 17 2016 07:13 Shield wrote:Show nested quote +On October 17 2016 06:52 tofucake wrote: US visas are hard to get unless you have a sponsor. Getting a job isn't too hard though. So is the idea to get a job which may also mean a sponsor? How does interview work then? Is it via Skype? Obviously, you don't have a visa unless they give you temporary one for interview. :D I got one job interview from the US and it went through on Skype. Couldn't get the job though because the interview happened after the H1-B filing deadline.
|
My latest doodles for anyone interested: BitBucket link
If you're doing PHP (or you're good with bitwise operations) I'd be glad to hear any suggestions on improvements for that little thingie.
|
On October 18 2016 20:40 Manit0u wrote:My latest doodles for anyone interested: BitBucket linkIf you're doing PHP I'd be glad to hear any suggestions on improvements for that little thingie.
Sure! Even though I "professionally" (read: for money) program PHP, I would not consider myself an expert in this language. So here are some rather general suggestions:
- 15: Your class should not be abstract, because you don't intend anyone to inherit it. If you want to prevent someone from initiating your class (which is a good idea since it's only a namespace for static functions) you should set your constructor to private. Unfortunately there is no such thing as a keyword for "dont initiate or extend my class" in php.
- 83: Usually you would write this like so: $b === 0. The constant is always on the right. This does not make much sense; its just a convention that everyone adheres to. If you do it the other way round, you will confuse people.
- 84: You throw an "Exception" of the most abstract type here, which is a bad practice. Usually, there is always a more specific Exception type, you can throw. Why is this a bad practice? Imagine someone calling a function that is using your function, lets call it "doComplicatedStuff". During the execution of doComplicatedStuff, all kinds of errors can occur: Memory, Connection, File not found, etc. Only one of the many exceptions that can occur is your "Division by 0", but the only way to catch this one is by using catch(Exception). Of course the caller of doComplicatedStuff can always use catch(MemoryException), catch(ConnectionException) and catch(FileNotFoundException) before the last cast(Exception). But what if the programmer was extra smart and thought: Maybe there is some kind of Exception I didnt think of and I still want to catch it (and maybe log it or something)? Then he would want to use that last catch(Exception) for that.
Okay, but you might say in that case he can have a look at the message of the Exception. This is once again a bad practice because it is hard to read for whoever might read your code some day and because its very error prone. When the message gets changed (or translated), the check for it in the last catch-clause must be adopted as well. Since no IDE can support this kind of analysis you are determinded to at least forget one of those places. LD;DR: Be as specific as possible when choosing an Exception type. You might even consider introducing an new Exception type (maybe not if you plan to release a general purpose library like this one, though).
- Automated tests would be nice. :-)
|
Hyrule18967 Posts
2: it's called a Yoda condition, and while I think it's dumb, it is fairly common 3: PHP doesn't throw on division by 0 so it's up to userland implementation, and there isn't an ArithmeticException type in PHP, so using Exception is correct
|
On October 18 2016 23:24 tofucake wrote: 3: PHP doesn't throw on division by 0 so it's up to userland implementation, and there isn't an ArithmeticException type in PHP, so using Exception is correct
PHP 7 throws when dividing by zero, and the same DivisionByZeroError can be used in user land code as well:
https://3v4l.org/l5ab3
A custom exception class would be an alternative solution.
|
On October 18 2016 23:24 tofucake wrote:2: it's called a Yoda condition, and while I think it's dumb, it is fairly common 3: PHP doesn't throw on division by 0 so it's up to userland implementation, and there isn't an ArithmeticException type in PHP, so using Exception is correct
Re 2: Just because it's common, doesn't make it intuitive. Like Yoda speaking common is too. Yet other people reading code want, better speak like Yoda not.
Re 3: So PHP is retarded. That's ok. You can still create your own DivisionByZeroException and throw that.
|
On October 18 2016 23:24 tofucake wrote:2: it's called a Yoda condition, and while I think it's dumb, it is fairly common
I used to hate it and thought it dumb but years of refactoring bad code had taught me that you're better safe than sorry. That's why I also never compare something to strings before declaring them as constants first (same with regexes) and use === in place of == whenever possible.
Nice to know that PHP7 introduced DivisionByZeroError. I'll be sure to implement that.
Edit: Exception is now DivisionByZeroError. thanks for that.
|
On October 19 2016 00:58 Manit0u wrote:I used to hate it and thought it dumb but years of refactoring bad code had taught me that you're better safe than sorry. That's why I also never compare something to strings before declaring them as constants first (same with regexes) and use === in place of == whenever possible. Nice to know that PHP7 introduced DivisionByZeroError. I'll be sure to implement that. Edit: Exception is now DivisionByZeroError. thanks for that. I guess I have not had to debug enough of other people's code to get to the point where Yoda conditions make sense. Most of my reading through other people's code consists of figuring out what the hell the code does, rather than figuring out what the hell is wrong with it, and Yoda conditions definitely do not help with that.
|
On October 19 2016 01:11 Acrofales wrote:Show nested quote +On October 19 2016 00:58 Manit0u wrote:On October 18 2016 23:24 tofucake wrote:2: it's called a Yoda condition, and while I think it's dumb, it is fairly common I used to hate it and thought it dumb but years of refactoring bad code had taught me that you're better safe than sorry. That's why I also never compare something to strings before declaring them as constants first (same with regexes) and use === in place of == whenever possible. Nice to know that PHP7 introduced DivisionByZeroError. I'll be sure to implement that. Edit: Exception is now DivisionByZeroError. thanks for that. I guess I have not had to debug enough of other people's code to get to the point where Yoda conditions make sense. Most of my reading through other people's code consists of figuring out what the hell the code does, rather than figuring out what the hell is wrong with it, and Yoda conditions definitely do not help with that.
Sometimes Yoda conditions are the only thing that saves you. You would be surprised how much of the old code base simply stops working when you juxtapose the conditions in an expression 
Anyway, I find it almost obligatory in PHP since you not only have variables that can hold anything at any time, but also weak comparisons (== vs ===) and such. It's really easy to mess things up. And, unfortunately, PHP doesn't give you all that fancy stuff that other languages have, which makes expressions more explicit and easier to read (.equals(Java and C#), is Python, Ruby? etc.).
Right now I'm at the point that any expression that doesn't follow Yoda in PHP is automatically suspect of bugs and labeled as error-prone in my mind 
You get used to it after a while.
|
|
|
|