|
HappyHippo posted:What else would you call simulated annealing? Hill climbing with excursions.
|
# ? Jul 30, 2013 03:09 |
|
|
# ? May 30, 2024 15:21 |
Corporate has decided to throw money at me, under the condition that it be spent to educate myself about further language possibilities. If I'm already good with C#/.NET/SQL/JS what other stuff would be good to pick up? What is the popular thing all the kids are hip with these days? I was considering PHP but I hear a lot of horror stories. Same with Ruby.
|
|
# ? Jul 30, 2013 15:57 |
|
ultrafilter posted:Hill climbing with excursions. That's a good way to phrase it. Its just Hill Climbing with support for avoiding local minima/maxima.
|
# ? Jul 30, 2013 16:17 |
|
Manslaughter posted:Corporate has decided to throw money at me, under the condition that it be spent to educate myself about further language possibilities. If I'm already good with C#/.NET/SQL/JS what other stuff would be good to pick up? What is the popular thing all the kids are hip with these days? I was considering PHP but I hear a lot of horror stories. Same with Ruby. Forth.
|
# ? Jul 30, 2013 16:54 |
|
Manslaughter posted:Corporate has decided to throw money at me, under the condition that it be spent to educate myself about further language possibilities. If I'm already good with C#/.NET/SQL/JS what other stuff would be good to pick up? What is the popular thing all the kids are hip with these days? I was considering PHP but I hear a lot of horror stories. Same with Ruby. F# - might as well learn functional in what sounds like your home ecosystem.
|
# ? Jul 30, 2013 17:39 |
|
Manslaughter posted:Corporate has decided to throw money at me, under the condition that it be spent to educate myself about further language possibilities. If I'm already good with C#/.NET/SQL/JS what other stuff would be good to pick up? What is the popular thing all the kids are hip with these days? I was considering PHP but I hear a lot of horror stories. Same with Ruby. I guess it would help to know what direction to go. Does your company want you investigating platforms for some future web app, or do they just want you to go take classes that will expand your mind as a programmer? Is there any mobile programming in your future? And what are your goals for this - to make yourself more employable, to expand your mind, or to learn something on your company's dime that you just want to tinker with at home? For web development, Ruby on Rails seems to be pretty popular. I'm not sure what you've heard about Ruby, but I found it to be an adequate scripting language, with enough differences from other languages I've used to be interesting. I'm not as familiar with Rails yet, but it seems to be a good skill to have, regardless of whether or not people like it. Python is popular, too, though I haven't used it. If you're doing any number crunching or other math/engineering type work, Matlab is good to pick up. There are some free knock-offs of it, though I haven't had great luck with them. Similarly, R seems to be very common for stats stuff.
|
# ? Jul 30, 2013 18:24 |
|
Manslaughter posted:Corporate has decided to throw money at me, under the condition that it be spent to educate myself about further language possibilities. If I'm already good with C#/.NET/SQL/JS what other stuff would be good to pick up? What is the popular thing all the kids are hip with these days? I was considering PHP but I hear a lot of horror stories. Same with Ruby. Seriously, ask what your problems are, and what the best tool is for the job. There's still situations where COBOL is the right answer.
|
# ? Jul 30, 2013 20:29 |
|
Manslaughter posted:Corporate has decided to throw money at me, under the condition that it be spent to educate myself about further language possibilities. If I'm already good with C#/.NET/SQL/JS what other stuff would be good to pick up? What is the popular thing all the kids are hip with these days? I was considering PHP but I hear a lot of horror stories. Same with Ruby. If you're not already very familiar with functional programming, Munkeymon's F# (or Haskell, or Clojure) would be good for learning. I'd recommend something only-functional like Haskell since you'll otherwise just end up trying to write C-ish/imperative code in that language. If you go that route, be sure to read some good functional programming stuff first. E.g., The Little Schemer or Why Functional Programming Matters. Heck, I recommend you read those two no matter what if you haven't.
|
# ? Aug 1, 2013 03:45 |
|
I am writing an employee scheduling program that the company I work at (~5500 people at ~50 locations) may or may not use. They haven't seen it yet, and they didn't ask for it. What they have now (paper and pencils!) sux tho. There is a separate file for each calendar week. Each file contains all the information on the people that are in it, so that it is 'complete' and doesn't ever need to reference any other file in order to be readable. The weekly schedule data files started out written as plain text so I could troubleshoot things easier. I was planning on using some other mode later. At some point I got the bright idea of leaving them plaintext..... That way the weekly files could be written as web pages that show simplified versions of the schedules, and still contain the program's full data hidden as comments in the web page tags. And because of this, anyone could view the schedule file just by using a web browser, if they did not have the full program or did not know how, or simply did not want to bother to use it. There is a size increase, but it is not prohibitive: a week file with ~125 people is only around 250K, and adding on the HTML stuff only sticks about 30K more onto it. I would suppose that the greater accessibility would be worth it. Is there a name for this? Do any programs already do it? If not then this is patented and you all owe me one BEEEEELion dollars.
|
# ? Aug 1, 2013 17:09 |
Sounds vaguely like what MS Word 2003 did when asked to save as HTML: Produce a file that's technically HTML, but is also stuffed with all kinds of additional data intended to make it load (almost) perfectly as the original document back into Word.
|
|
# ? Aug 1, 2013 17:17 |
|
Or are you asking if there's a name for the general idea of marking up data with HTML so it can be viewed by a web browser? Because that's "HTML"
|
# ? Aug 1, 2013 17:18 |
|
So in a phone interview a prospective employer mentioned that they may want to start creating an API for all their in-house poo poo. Where is a good place to start learning about making an API? What languages work for APIs? REST or SOAP? Are there other big questions that need to be answered first? I mean, I've started googling around, but is there a super awesome resource that I should start with or a paper that I should definitely read or anything like that?
|
# ? Aug 1, 2013 20:25 |
First, figure out if they actually do mean a web service API or if it's supposed to be a regular local call API. The kinds of designs to use need to be different to cater to the strengths and weaknesses of local vs. remote call interfaces. Now if you have never written a public interface for wide consumption for some application or set of applications, you will probably make a ton of mistakes. Make sure you catch them early, test your poo poo, also before you start writing any code. Run through use cases. Do role-play sessions if necessary. If the intention is a remote call API (web service), first of all stay away from SOAP, it's a royal mess. It's very rare that two implementations agree on how things are supposed to work, I think I've even heard stories about implementations that couldn't read back the service definitions it had generated itself. Basic JSON-over-HTTPS is generally a safe bet. You can build some kind of stateful sessions on the server system if you want (making it not RESTful), don't be afraid of doing that if the existing systems are very stateful. If you use JSON for data representation, make sure you are consistent about your representations of things. It's an easy trap to fall into, to hack things up and end having like things act completely different. People will hate you for that, and your documentation will be hell to write. Consider whether the application(s) the API is for mostly work with object storage/retrieval, or whether you will actually be doing more complex operations on them. If it's the former, using the HTTP verbs as intended can work fine. If it's the latter, I would restrict things to the GET and POST verbs, and use POST for all non-retrieval operations, storing the actual operation inside the JSON payload. This makes it more like a traditional RPC protocol. (Look into JSON-RPC for this too.) Read the documentation for a ton of existing APIs for other services. Both for ones similar and dissimilar to what you will be doing. Get a feel for how the different ones are designed, and what kinds of documentation you like and dislike. Start out by writing a small proof-of-concept prototype implementing a single or two small functions, to get a feel for how working with the stuff actually is. Then start writing documentation for the entire system you want to build. Document the entire API before implementing it. When your documentation is finished, begin implementing it. It's okay if the implementation doesn't match the documentation completely because of practical considerations, when that happens change the documentation immediately. (Never let the documentation get out of sync with the actual implementation.) If you will be interfacing to many different services it might be better to implement one or two immediately after documenting them, to avoid getting caught in a slump, and get some more hands-on experience. That's how I would recommend approaching the problem. I don't know of any texts you can read on it, most of this is based on my own experience. Hope it's useful.
|
|
# ? Aug 1, 2013 21:00 |
|
Tres Burritos I think you're me from 6 months in the past. In which case I can say that all of nielsm's advice is sound. JSON over HTTPS REST service is definitely the way to go. Write it in whatever language you're most comfortable with. You're gonna make mistakes, test and iterate a lot to improve the design. Document the gently caress out of everything. There's lots of great libraries out there for rolling a REST service, check a few out. I wrote a basic hello world + JSON serializer using a bunch of different ones until I found what seemed to fit best. I read some books because I was worried I didn't know what I was doing, but they didn't really help a whole ton. If its in-house that'll probably help, find out more about what they want the services to handle. I'm working with a customer but they're pretty new to this too so that gives me tons of leeway, you should be able to talk to the company about their requirements and then just design to spec.
|
# ? Aug 1, 2013 21:09 |
|
Good stuff. Yeah it was described to me in vague terms but it sounds like they want an API to sort of pull all of their software together. They've got client facing stuff with RoR and in house stuff using .Net and C#.
|
# ? Aug 2, 2013 00:36 |
|
Ugh, I'm trying to make a SOAP request to First Data (payment processor, https://www.firstdata.com/en_us/home.html) with ColdFusion 8, and I cannot for the life of me get this HMAC signature working.quote:The HMAC is calculated with the SHA-1 algorithm on the following: I'm using Java to generate - code:
Expected signature 'nHl+GYd9fCe4P/Me798WdUem0Dk=', received signature 'bHXNs+qIguatBsE+1SLNIUisMmg='. Here's more of the code that puts everything together: code:
|
# ? Aug 2, 2013 22:21 |
|
Does an iPhone video contain location data over the whole span or is it just tagged where you started? Is there a way I could correlate fine grained location data to each frame?
|
# ? Aug 2, 2013 22:43 |
|
What's the best/least bad way to use an iPad(with a decent bluetooth keyboard) as a development machine. Something like Cloud9 would be fantastic, but it doesn't seem to play well with a touch interface. There are jailbroken utilities that let you use a BT mouse, but it just emulates touches. Any decent IDE apps with at least basic stuff like syntax high-lighting and auto-indent?
|
# ? Aug 3, 2013 01:52 |
|
The Insect Court posted:What's the best/least bad way to use an iPad(with a decent bluetooth keyboard) as a development machine. Something like Cloud9 would be fantastic, but it doesn't seem to play well with a touch interface. There are jailbroken utilities that let you use a BT mouse, but it just emulates touches. Any decent IDE apps with at least basic stuff like syntax high-lighting and auto-indent? Is this a joke? Why would you ever want to use an iPad for this?
|
# ? Aug 3, 2013 19:15 |
|
Probably a rather dumb question but I'm kind of a computer graphics idiot: is there a standard way of faking two point perspective for a 2D surface? Basically all I need is a function to approximate the mapping from points on the "flat" original plane to points on a plane of the same dimensions which is viewing the flat surface with some angle between an edge share between the planes, and a function to go in the opposite direction. I pencil and notebooked this last night and couldn't come up with any reasonable approximation, and the proper 3D solution to this problem is overkill and scares the hell out of me. Note: I don't actually want to use this to draw textures projected in this fashion because that would look terrible, I just want to be able to approximate where grid cells "should" go on the screen, and in the opposite direction approximate where mouse clicks "should" go on the underlying flat surface. e: for example, this is what my current approximation of two point perspective would look like if you drew a 200x100 rectangle (at 0.5 fixed scaling)... not totally happy with it. It seems to be curving away from the viewer rather than projecting out at an angle. Seashell Salesman fucked around with this message at 01:34 on Aug 4, 2013 |
# ? Aug 3, 2013 19:58 |
|
What do you mean by two-point perspective? The number of points of perspective in a scene is based on the composition of the scene rather than anything to do with how it's rendered. To give an example, when you draw a cube looking straight onto an edge, it's in two-point perspective because there are two sets of parallel lines that head to two distinct vanishing points. The rectangle you're trying to draw does not have two-point perspective. Jabor fucked around with this message at 02:25 on Aug 4, 2013 |
# ? Aug 4, 2013 02:21 |
A really basic, proper 3D projection is literally just dividing two of the 3D coordinates by the last. Xproj=X3D/Z3D and Yproj=Y3D/Z3D. When all your points lie on a single plane and the camera won't be moving, you can choose an appropriate coordinate system for your viewport and be done with it, pretty much. Here the camera would be located at (0,0,0), and if we assume the Z axis goes into the display (positive Z is in front of the viewer), and X and Y map to X and Y on the viewport, you could for instance have 2D X map to 3D X, 2D Y map to 3D Z, and have 3D Y be a constant different from zero. The 3D Y would determine the location of the plane in 3D space. The hard part is figuring out your coordinate system system from 2D plane to 3D plane, and viewport for the projection. It should be easy enough to work out if you decide on some extreme values in each input range and how you would like those to map in the output coordinate system. nielsm fucked around with this message at 02:52 on Aug 4, 2013 |
|
# ? Aug 4, 2013 02:49 |
|
Jabor posted:What do you mean by two-point perspective? The number of points of perspective in a scene is based on the composition of the scene rather than anything to do with how it's rendered. Apologies for abuse of terminology. I did get my approximation working the way I wanted, and maybe a less crappy test image from that approximation will explain what I meant. A texture: Approximation of texture as if viewed from an angle: nielsm posted:A really basic, proper 3D projection is literally just dividing two of the 3D coordinates by the last. Xproj=X3D/Z3D and Yproj=Y3D/Z3D. When all your points lie on a single plane and the camera won't be moving, you can choose an appropriate coordinate system for your viewport and be done with it, pretty much. I will try this! I got scared off by the Wikipedia page for a camera projection mostly because I haven't even thought about matrices since University.
|
# ? Aug 4, 2013 03:00 |
|
For reference, if you're just looking to project a texture onto a flat plane at an angle to the viewer, the Super NES had a pretty good approximation.
|
# ? Aug 4, 2013 03:46 |
|
Jabor posted:For reference, if you're just looking to project a texture onto a flat plane at an angle to the viewer, the Super NES had a pretty good approximation. That is basically what I want to do, and I guess it should be simple enough to do that in software using the formula from that page. I'm not actually using this to project textures, though. The example was using a texture because it shows what's going on visually (and that's how I tested the function). The app I'm working on would have flat background textures that were drawn at the 'perspective' that is intended. I want to use the approximation of projection on the underlying grid to figure out how to lay objects out on the screen so that they appear to be following the perspective of the background (think of how you would lay out the pieces on a chessboard background when the chessboard in the background texture was drawn at a 45 degree angle to the viewer). Hopefully I'm making sense!
|
# ? Aug 4, 2013 05:05 |
|
MeramJert posted:Is this a joke? Why would you ever want to use an iPad for this? Because I've got my ipad with me everywhere and being able to use it plus a bt keyboard cover to do at least basic programmers stuff would be a lot more than I can do now with it. I don't expect a full fledged MacBook replacement or anything, just basic competence
|
# ? Aug 4, 2013 05:23 |
|
The Insect Court posted:Because I've got my ipad with me everywhere and being able to use it plus a bt keyboard cover to do at least basic programmers stuff would be a lot more than I can do now with it. I don't expect a full fledged MacBook replacement or anything, just basic competence Grab a terminal app (I use Prompt) and ssh in somewhere (maybe your actual computer or some $2 VPS somewhere). Use (or decide on) your text editor of choice.
|
# ? Aug 4, 2013 05:47 |
|
Tres Burritos posted:So in a phone interview a prospective employer mentioned that they may want to start creating an API for all their in-house poo poo. Where is a good place to start learning about making an API? What languages work for APIs? REST or SOAP? Are there other big questions that need to be answered first? nielsm posted:Basic JSON-over-HTTPS is generally a safe bet. You can build some kind of stateful sessions on the server system if you want (making it not RESTful), don't be afraid of doing that if the existing systems are very stateful. Zaphod42 posted:Tres Burritos I think you're me from 6 months in the past. In which case I can say that all of nielsm's advice is sound. Tres Burritos posted:Yeah it was described to me in vague terms but it sounds like they want an API to sort of pull all of their software together. They've got client facing stuff with RoR and in house stuff using .Net and C#. JSON+REST+HTTPS is good for a public client-server API, sure. But it's not necessarily the best. For internal services, you might want to consider Thrift or something like it to build your APIs around, or even go directly and build libraries to wrap a message queue for things that might need to broadcast or claim jobs, etc. - stuff that isn't strictly oriented around point-to-point, client-to-server interactions. I would definitely be inclined to put an HTTPS REST API on something that is fully for public consumption, but whatever I did, I'd have the API "frontend" be a wrapper for internal RPCs to services that actually had to handle stuff. Otherwise, implementation details seep in far more insidiously into your server and make it way less modular. Any time an API works a little differently to the public, it'll break, so APIs have to be either slow-moving or unstable. If you don't insulate the business logic, *that* will become slow-moving, too, or you'll have a bunch of client API breakage and fires to constantly put out. tl;dr: Very thin API frontend (JSON, REST, etc.) <--> Thrift or some other RPC mechanism <--> API Backend (i.e. internal systems, business logic). That way, when you make your API backend into a polyglot system that uses different languages to play to their strengths, or turn it into a service-based system, or make some other important implementation decision, the frontend is insulated from those changes, so it gives you a lot of freedom. If some piece of software is the best but written in a particular language, you can use that no problem. If you need to offer a new service publicly you're already wired up to have a many-to-many API server to internal server system, or you can scale them independently depending on demand, reducing risk. Doctor w-rw-rw- fucked around with this message at 06:36 on Aug 4, 2013 |
# ? Aug 4, 2013 06:30 |
|
Matlab question: What's up with my x axis? It should go from 00:00AM to 23:59PM. Ideally in 2 hour chunks, like "...0400 0600 0800..." but when I try to get fancy with datetick and datenum, it gives me a doubled xaxis that repeats twice, with no graph displayed. Here's my attempt at using plotyy and datetick in Matlab, which is a disaster: code:
|
# ? Aug 4, 2013 19:52 |
|
Never used datetick or plotyy myself but here is some code which gives a graph with the correct axis at least.code:
RichardA fucked around with this message at 13:42 on Aug 5, 2013 |
# ? Aug 5, 2013 13:39 |
|
What's a good resource to learn about handing fonts? Are there any popular libraries out there that make them easy to work with? I'm planning on making a cool little font utility for my wife and I've never worked with fonts before.
|
# ? Aug 6, 2013 01:08 |
|
cletus42o posted:Stuff about HMAC's Shooting from the hip here, but recently a co-worker was having an issue with not being able to replicate a customer's HMAC's and it all came down to using Jave's built-in Base64 encoding. Apparently it was adding in new lines and wrecking the original input string. His solution was to use the Apache Commons Base64 library. Like I said, I'm shooting for the hip here and didn't study your code in depth but hopefully that is helpful.
|
# ? Aug 6, 2013 01:27 |
|
oRenj9 posted:What's a good resource to learn about handing fonts? Are there any popular libraries out there that make them easy to work with? I'm planning on making a cool little font utility for my wife and I've never worked with fonts before.
|
# ? Aug 6, 2013 02:12 |
|
Misogynist posted:This is really hard to deal with in a cross-platform way, since each one handles fonts differently and some (Linux) handle fonts in multiple disparate ways. Are you talking about Windows? OSX. I'm trying to do two things, the first is to build a simple application that she can use to preview some text in every font she has. Right now she prints out all of her fonts and keeps them in a huge binder. She'd rather have her "font binder" be a program instead. I could never find a program similar to character map in OSX, so I'll probably add that functionality as well. The second thing I'm trying to do is automatically categorize fonts as similar based on characteristics.
|
# ? Aug 6, 2013 03:17 |
|
There's no way that doesn't exist already. It's already built in to the font selector in Word; all they'd have to do is port the work they already did to a smaller program Edit: two seconds on google https://itunes.apple.com/us/app/font-picker/id507086472 it is fucked around with this message at 05:01 on Aug 6, 2013 |
# ? Aug 6, 2013 04:59 |
|
Good find. We planned on monetizing this app eventually, so it is good to see that there is a market for this.
|
# ? Aug 6, 2013 07:14 |
|
it is posted:There's no way that doesn't exist already. It's already built in to the font selector in Word; all they'd have to do is port the work they already did to a smaller program There's already a "Font Book" app built into OS X. Does that app add anything more?
|
# ? Aug 6, 2013 09:46 |
|
To answer the original question, FreeType is good and portable. I use it in my game engine.
|
# ? Aug 6, 2013 13:49 |
Rottbott posted:To answer the original question, FreeType is good and portable. I use it in my game engine. Only it doesn't solve your problem if you have text in any even slightly complex script. (Don't roll your own text layout code, you will do it wrong no doubt. Freetype won't layout your text for you.)
|
|
# ? Aug 6, 2013 14:07 |
|
|
# ? May 30, 2024 15:21 |
|
He said fonts, not text formatting, but that's true. I have rolled my own text layout code; it's an absolute nightmare. Shame FT Layout doesn't seem to have gone anywhere, anyone know of any libraries for doing it?
|
# ? Aug 6, 2013 18:14 |