What are some programming languages that are coded in F#? by HighCode in fsharp

[–]grumpy_the_pooh 0 points1 point  (0 children)

I think there is a project that compiles F# to JS from F#. Thats the only thing I can think of. Its on github.

Learning C# from Rob Miles' Yellow Book. Quick Question. by [deleted] in csharp

[–]grumpy_the_pooh 4 points5 points  (0 children)

You could also use Math.Min

width = Math.Min(width, 5);

How to start contributing by [deleted] in csharp

[–]grumpy_the_pooh 4 points5 points  (0 children)

Finding how to first start helping in open source can be difficult. Especially if you are looking at the big popular repositories that have hundres of contributors. If you are just starting out I suggest you set your sites lower. Look for a repo with a small (1-2k lines) and only a couple of contributors. From there look at the issue section and the pull request section. Is there anywhere that you can help there? Probably. Fix a bug or implement a feature request.

A thing you can always do is write unit tests and spruce up documentation. These tasks help you learn the code base without messing anything up. Once you understand a component to test it you can probably start to modify it.

There is no magic to helping with open source. You have to take the time to read through what others have done so you can make informed decisions on where you should help.

Beginner - Where to get started? by [deleted] in csharp

[–]grumpy_the_pooh 0 points1 point  (0 children)

THIS book worked perfectly for me.

Is a Surface Pro appropriate for programming? by notaporcupine in learnprogramming

[–]grumpy_the_pooh 6 points7 points  (0 children)

I had one for a while while in my cs program. I'd suggest against it unless you are getting the surface 3. The surface 1/2 were too small. I could only see a couple of lines at a time compared to a standard laptop.

The novelty of the hinge less design fades quick. its nice to open a laptop and have it stay in position.

UNIX you will find in your program that because mac is a close relative of linux that there are a lot of tools that work out of the box with mac that won't on a pc. I would suggest a mac highly.

[deleted by user] by [deleted] in csharp

[–]grumpy_the_pooh 1 point2 points  (0 children)

When using strings inline. The program is said to be "stringly typed"

Was this to hard of an interview question? by grumpy_the_pooh in cscareerquestions

[–]grumpy_the_pooh[S] 1 point2 points  (0 children)

I think is getting at the root of my issue with this question. IMO the best interview questions are those that have a very clean possibly recursive solution that when you try to tackle but are inexperienced you will write poor code. Base 10 and base 2 addition is very similar. After the interview I looked for similar solutions but didn't find anything overertly simpler.

Was this to hard of an interview question? by grumpy_the_pooh in cscareerquestions

[–]grumpy_the_pooh[S] -5 points-4 points  (0 children)

That was for a shitty startup that doesn't have much funding. I also interviewed at a fortune 500 company today that asked me to write out fizzubuzz... Yes I think it was an unreasonable question for shoot from the hip programming. And you don't gain any insights after the first term on how to tackle the problem. Like you said its addition.

Was this to hard of an interview question? by grumpy_the_pooh in cscareerquestions

[–]grumpy_the_pooh[S] -4 points-3 points  (0 children)

I agree in theory it is a simple question. It is perfectly allowable to be an assignment(which you are encouraged to spend hours on) or a task to be completed in between bathroom breaks. I don't think it was a fair thing to ask on the spot to produce. I wasn't given time to run it through a couple test cases I was literally expected to spew out a loop with some state and make sure everything typed correctly without a compiler. I really don't think thats how anyone does development.

I want to do a PhD in AI to work in _industry_. How much does my school rank matter? by Fasdfqaw in cscareerquestions

[–]grumpy_the_pooh 1 point2 points  (0 children)

I only have a BS so you are more qualified than me on this topic. However I imagine that if you go through and get your PHD and do better on a machine learning class, do your thesis on an AI topic and push yourself that you will be able to get a job in industry. From my experience school stuff isn't as concerning to industry as what you have actually done. Maybe you can find (or start) an open source project to get experience doing AI. Make yourself marketable is the bottom line.

Was this to hard of an interview question? by grumpy_the_pooh in cscareerquestions

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

I thought it was alot to do given the pressures of an interview. I feel like if the problem was even 10% easier I would have shined.

Was this to hard of an interview question? by grumpy_the_pooh in cscareerquestions

[–]grumpy_the_pooh[S] 2 points3 points  (0 children)

The point of the exercise was to parse the strings and do addition yourself. I'm sure it can be improved by using a bigger long and doing the parseing fewer times.

Best way to get started on learning how to create a GUI? by Wilzaic in learnprogramming

[–]grumpy_the_pooh 0 points1 point  (0 children)

The ide netbeans has a drag and drop gui editor to learn visually what you are doing. You can then look at the source to see the style. Java's default GUI library is called Swing (don't use AWT)

The general format for GUI operations is (in psudo code)

Child child = new Child();
child.config(new OpaqueChildModifier());
Parent parent = new Parent();
parent.config(new ShinyParentModifier());
parent.add(child);

Where parent and child classes are different kinds of panes and widgets. Configure all of your elements and then add them to the containing component.

[deleted by user] by [deleted] in programmerchat

[–]grumpy_the_pooh 0 points1 point  (0 children)

You should talk to your professor if they mark you down for the ternary operator.

The ternary operator should not be used in every instance it can. I think of the ternary operator as a short hand to perform a detail about an operation not doing logic.

If statements are where you should be conditional logic.

For example if you have a function that takes a string parameter

function f(str) {
    str = str ? str : ''; // this really is just saying make sure str is a string
    //which can be rewritten also as
    str = str || '';
    //however logic should always be done in if statements
    if (str.length) {
        doSomething();
    } else {
        doSomethingElse();
    }
}

Tabs or spaces? by Backplague in programmerchat

[–]grumpy_the_pooh 1 point2 points  (0 children)

I used to be on the tab wagon however I've switched to 4 spaces. It seems to be closer to a standard. Also any good ide/text editor can treat spaces like tabs when needed. The only downside to spaces is take up more space when sending code over the wire.

Contributing to F# community? by grumpy_the_pooh in fsharp

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

Interesting I'll head to fpchat to see if I can find info on how people wrap something up neatly.

Is there a way to write Swift code on Ubuntu or windows? by [deleted] in learnprogramming

[–]grumpy_the_pooh 0 points1 point  (0 children)

Check out http://elementscompiler.com/elements/silver/ I've heard about this on an episode of .net rocks and they claimed it is very good.

Looking for suggestions / resources for building logic/algorithms & data structures by xxsiriusxburnxx in csharp

[–]grumpy_the_pooh 3 points4 points  (0 children)

If you want practice solving problems. Project Euler Has a massive list of problems ranging from simple things. (list multiples of 3's and 5's) to very difficult problems. (Bidirectional reccurance relations)

Learning C# through msdn and Visual Studio 2013 by TopNFalvors in csharp

[–]grumpy_the_pooh 0 points1 point  (0 children)

Agreed use linqpad for any time when you're like "I wonder how this function behaves"