Author

Topic: [LFW] Software Engineer, offering to help fix your broken code and/or designs (Read 2387 times)

newbie
Activity: 8
Merit: 0
Hi,

Sorry to threadjack, but in reply to FarmerBlue-

It is possible to use Chrome to execute the code you've written from a file stored locally, but there is a potential degree of risk involved. Disabling CORS should allow these requests to complete, but be advised that this will leave you vulnerable to Cross-Origin attacks that you may encounter whilst this browser session is active.

To disable CORS in Chrome - start it with the '--disable-web-security' parameter (without quotes). Close all Chrome windows and launch it again without the parameter to resume browsing with CORS enabled. I hope this answers your question.
member
Activity: 66
Merit: 10
i wanted javascript so i could run it from my c drive,.....is there another language i can that will allow me to run it from from my local hard drive and not just from a web hosting site?
sr. member
Activity: 271
Merit: 250
think i am getting confused between JSON and JSONP kinda thought was same thing.


Been there and done that myself. http://javascriptweblog.wordpress.com/2010/11/29/json-and-jsonp/ explains the difference pretty well, if you have the patience for it.

As to your specific question, would you like to continue with Javascript or are you open to using a different language?
member
Activity: 66
Merit: 10
think i am getting confused between JSON and JSONP kinda thought was same thing.
sr. member
Activity: 271
Merit: 250
I'm assuming you grabbed this code from StackOverflow, since this snippet looks familiar.  Smiley


If I had to hazard a guess, what the answer on stackoverflow says still may hold true:
Quote
Unfortunately, the Mt. Gox API does not support JSONP nor CORS at the time of this writing. It seems like it would be easy enough for them to add JSONP support, so if they add it in the near future, this answer should help; until then, however, this answer does not help. The rest of this answer assumes now is the future and they support JSONP.


Unfortunately, I'm not familiar enough with the MtGox API to say if they have implemented this or not. My first 2 thoughts to fixing this would be:
1) Try jQuery.ajax() instead and see if you can get a proper error message, or
2) https://github.com/cronopio/hook.io-mtgox might be a workaround

There's probably a few other examples of mtgox + javascript on github. Give me a holler if you'd like any extra help with this!
member
Activity: 66
Merit: 10
Just learning JavaScript but frustrated at my code that should work but isn't, no errors just no results.


trying to access MtGox api to extract 1 piece of data, don't need the rest of the data.


Here is my code:



Here is the JSON file from the url:
(it is all one line but i broke it down to more easily see it on the forum)
(and i made the path glow yellow and the actual value i am after red font.)

{"result":"success","return":
                             {"high":
                                     {"value":"47.47999","value_int":"4747999","display":"$47.47999","display_short":"$47.48","currency":"USD"},
                              "low":
                                     {"value":"46.35000","value_int":"4635000","display":"$46.35000","display_short":"$46.35","currency":"USD"},
                              "avg":
                                     {"value":"47.12188","value_int":"4712188","display":"$47.12188","display_short":"$47.12","currency":"USD"},
                              "vwap":
                                     {"value":"47.07781","value_int":"4707781","display":"$47.07781","display_short":"$47.08","currency":"USD"},
                              "vol":
                                     {value_int":"1876997747627","display":"18,769.97747627\u00a0BTC","display_short":"18,769.98\u00a0BTC","currency":"BTC"},
                              "last_local":
                                     {"value":"46.90000","value_int":"4690000","display":"$46.90000","display_short":"$46.90","currency":"USD"},
                              "last":
                                     {"value":"46.90000","value_int":"4690000","display":"$46.90000","display_short":"$46.90","currency":"USD"},
                              "last_orig":
                                     {"value":"46.90000","value_int":"4690000","display":"$46.90000","display_short":"$46.90","currency":"USD"},
                              "last_all":
                                     {"value":"46.90000","value_int":"4690000","display":"$46.90000","display_short":"$46.90","currency":"USD"},
                              "buy":
                                     {"value":"46.80017","value_int":"4680017","display":"$46.80017","display_short":"$46.80","currency":"USD"},
                              "sell":
                                     {"value":"46.90000","value_int":"4690000","display":"$46.90000","display_short":"$46.90","currency":"USD"},
                                      "now":"1363376926783757"}}

not getting any errors either in my html editor, in IE or in firefox, but nothing displays on my page (doing this locally on my C: drive btw if that is a factor)
sr. member
Activity: 271
Merit: 250
I always see a ton of "coder LFW" or "programmer LFW" posts here, but I'm not sure if I have ever seen anything about code maintenance as opposed to code creation...there is much, MUCH more to code's life cycle after it's been created. I'm also aware that there have been recent issues with underaged/underskilled programmers, making the need for (at least) half-decent code reviews that much more pressing.

None of what is intended here is directed as an insult towards any other coders here; bugs in production code are inevitable, even with legions of trained engineers and dozens of code reviews. I sinceerely apologize in advance if anyone takes offense to any part of this message...I merely think I could help improve some of the code quality before it bites someone in the butt later down the line.


So, based on that, here's my proposal:
- Do you have a busted project?
- Did the code monkey you hired for 6 bitcents per day fail to deliver?
- Not sure if your project’s design is feasible…or even possible?
- Got a nested loop 15 layers deep and can't see any way to flatten it?
- Are you hitting serious performance issues now that your site has 3,000 users instead of 30, and not sure where the bottleneck is?
- Or are you even just stuck with a dumb bug you can't find the answer to on StackOverflow?

I can help. Or, at the very least, I promise you I will do my best to. I've been poking around in various programming languages for the last 8 years, majored in Computer Science and Engineering in college, and currently work as a Software Engineer at one of the larger companies in Silicon Valley. Yes, I am over 18...and I'll gladly submit any proof as to that, or to my engineering skills.


If you are interested, throw me a PM with the following:
1) Language the code is written in
2) Brief description of the issue you're facing
3) What you want to have happen
4) If you want, any up-front cost you're willing to pay. Totally optional though  Smiley

We can also discuss over gchat, skype, or whatever else, but my full-time job will take priority over such conversations.


Pricing:
Given the difficulty in predicting how much effort any particular project might require, I'll keep this fairly vague for now. I apologize if this sounds evasive.

- I will give you a free estimate when presented with a task. I may need to ask for more information before providing such an estimate though.

- If the task is very simple (such as requires me just redirecting you to a StackOverflow question to resolve), then I will not as for anything. Donations are always welcome though  Smiley

- For code reviews and debugging help, it will depend on the length of the code.

- For discussions about projects, these will be free for a certain amount of time and questions. For now, let's call it 5 minutes or 8 questions. This is pretty arbitrary though. In any case, after the set limit, I will start charging a small agreed-upon amount to continue.

- Finally, actually writing or re-writing code will probably be the most expensive of these categories. However, I promise that you will get more than what you pay for.

Basically, when in doubt about about how much a job will cost, I will leave it up to how much it’s worth to you to have your code fixed. I think that sounds pretty fair.


Technical Skills:
Not to come across as arrogant, but I can probably learn anything not listed here if needed.

- Know and love: C, C++, Python, Django, Java, SQL (MySQL and PostgreSQL), miscellaneous *nix knowledge (mainly RedHat and Ubuntu)
- Know, but less fond of/less proficient with: HTML, JQuery, Ruby on Rails, PROLOG, Perl, C#, Android programming, Windows batch files
- Don’t know, or prefer not to use: PHP, vanilla Javascript, Lisp, MATLAB, Objective C

If your project/question is in any other language, I’ll still gladly take a look at it if you would like. However, I promise no miracles!


FINAL NOTE: Nothing illegal. Even borderline-gray-area-but-it-should-be-ok-cos-I-have-a-buddy-who-tried-it-and-didn’t-get-in-trouble-for-it-so-no-worries-right is thin ice.




Thanks for your time and for reading all that mess. [/wallOfText]
Jump to: