Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am about to start working on my master project which is processing images that are captured by an iOS application. My supervisor gave me the option to either develop the application with Swift or Objective C. I have searched online about which of them is better in terms of image processing and I still could not determine which one is better. Therefore, what would you suggest?
You can do everything with Swift, that you can do with Objective-C, but Swift offers additional advantages.
Swift has a simpler but more powerful syntax. You only need to maintain single source files, instead of interface/implementation pairs. Swift has better ways of dealing with errors and optional properties. Most importantly, for your image processing app, the compiler will optimize Swift code to run faster than Objective-C.
As with Cocoa objects, any pre-existing Objective-C image processing frameworks you might wish to use, can be called from Swift with no problem — so, you can "mix and match" as desired.
The only reason I can think of why you might wish to choose Objective-C over Swift, would be if time were of the essence and you were already totally up to speed with Objective-C, and had no time to learn Swift.
Any answer to your question will contain a fair amount of opinion and you need to weigh up the pros'n'cons yourself and make a decision - there is no right or wrong answer here.
which of them is better in terms of image processing
Neither. You'll also probably be using existing frameworks a fair amount and writing C-level (as in the language) code and that will work out much the same in either language.
I am about to start working on my master project
Go with which you are most comfortable with, you want to be able to concentrate on the topic of your Masters and not spend time learning a language/paradigm you are unfamiliar with.
Consider that Swift is still in a state of flux, Swift 3 is expected sometime in 2016 and it will change things - Apple have made it clear that (at least the first versions of) Swift is not yet stable and code may be broken by updates. This doesn't mean you shouldn't use Swift, but if you do try to stick with the same version during your Masters and resist any temptation to upgrade.
HTH, and may your Masters go well.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Lua beginner here, i am looking into lua.
my question is: since an object in Lua is just a table,
new fields can be added at runtime. if I have a typo in the code, and instead of changing a field, I create a new field, won't that bring mayhem? ;)
I would only be able to figure out the bug in runtime, if I even get to that point in the program.
(of course the table concept has other benefits like meta programming without reflection, but my question is about "safety" or predictability.)
Is that the right conclusion?
Yes, that is correct.
When working with a dynamically typed language, you'll need an extensive suite of unit tests, to make sure you cover all possible scenarios and prevent the kind of mayhem you described.
If you want to protect yourself from this, I'd recommend looking at a static typed language, such as java, c# or scala, and let the compiler do the type-checking for you.
This is why Twitter moved from Ruby to Scala - as the project grows, it gets progressively harder to keep track of bugs that can only be verified at runtime using a dynamically typed language - but could be verified at compile-time by a static language compiler.
Dynamic typed languages are based on duck typing:
If it walks like a duck, and quacks like a duck, it is a duck
I prefer this version:
If it walks like a duck, and quacks like a duck, it’s probably gonna throw exceptions at runtime.
Lua gives you the mechanisms to have at least as much safety as other dynamic programming languages with baked-in object models do. See here for instance.
Errors will still happen at runtime only though, so you need a test suite with decent coverage.
There are projects to add static typing to Lua. Fabien Fleutot, who created metalua, presented his at the latest Lua Workshop. See:
his slides
a high-level overview of his work
a more formal paper about it
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I'm starting project number 8,192. Like most of my projects, they are either throw-away projects or projects that get canceled either from boredom, time or lack of usefulness.
But there is a project that has been on the back-burners for a long time that I really want to finish. In my perfect world mind, it should take 3 months for first release.
Anyway, one of my biggest issues is taking a large project (or even a small to medium one) and break it down into manageable pieces. My error is to always jump right on the terminal, open Textmate and start coding. This almost always fails. I get lost in feature creep, learning newer methods, framework wars, etc. Then, two months have gone by and nothing to show for it.
So I was thinking if BDD (such as Cucumber) might be a solution to this? Could it be used to scope out the larger pieces, then the smaller pieces until I have a feature list that is most of the project. At that point, I just start coding the pieces right?
What are your suggestions on tackling this problem that I'm sure other developers share.
BTW, I'm using Rails 3 (sometimes Padrino).
Thanks
On which track? BDD doesn't define the track--it communicates the track.
BDD may be the only requirements you have (or need), but that doesn't address the issue of feeping creaturisms unless you have the discipline not to implement anything for which no spec exists.
Uncaptured features don't get implemented, period. If a feature is added, it gets a scope, and is prioritized with the rest of the features. It may usurp something less-desirable, it may not.
The product owner (you in this case) must decide how much can be implemented in the time allotted, and which features should be implemented. Still boils down to discipline, however, you just have a tool that (helps) make sure what you implemented is what you actually wanted.
It doesn't, however, make sure that what you get is only what you originally wanted--it won't make sure nothing else is implemented on top of the specs you bothered to implement.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Is it possible/feasible to use ObjC (not necessary the Apple flavor) to develop server-side web applications? Is GNU ObjC toolchain at all usable? Please share your thoughts and experiences.
Upd. I'd like to hear more answers with concrete practical experience, like "i tried/use .... and it is great/sucks, because...". 300 bounty!
Upd2. The rationale behind my question is that I'm about to develop an iOS app with a large web-based backend and thought it would be nice to use the same toolchain/IDE for both parts. But, alas, the answers so far show that this is not going to be feasible. Thanks everybody for taking time.
The answer that the market has pretty definitely settled on is that yes, it's possible, and no, it's not feasible to try to push such a thing on the market. Apple's WebObjects (what the Apple Online Store uses) used to be Objective-C and even they moved it to Java.
As for the GNU Objective-C toolchain, I wouldn't be hugely optimistic about its future, either. Since they moved to GPLv3, Apple has dumped them and built their own Objective-C compilers around LLVM, so those code paths are probably getting a little rusty on the GNU side. GNU "supports" everything under the sun, but the more something gets used the more its implementation gets vetted.
As for the "I've used" bit, yes, I used the Objective-C variant of WebObjects back in the day. It was pretty good for its time, but Objective-C's relatively low-level memory allocation needs and its non-C syntax made it a little awkward. And its strong typing was great for core development but burdensome for the "scripting" aspects of web development.
In the end if a language is Turing-complete you could theoretically do anything in one language you could do in another, but the lack of an ecosystem of libraries for parsers, scripting, database interactions, indexing, etc., means you'll be starting from a pretty deep valley compared to Java or a JVM-compatible language.
There is a javascript framework called Cappuccino that uses syntax very similar to Objective-C they call Objective-J. But as a long-time Cocoa developer, I prefer Sproutcore which doesn't copy Objective-C syntax, but it does borrow some ideas from Cocoa as it was created by former Apple engineers.
If you were thinking server-side development, I guess you could do it but it would probably take less effort to learn some popular server-side language than to get it all up and running with Objective-C
There is Frothkit. However, it hasn't been updated since 2010, primarily because of mature frameworks for other languages like Rails and Django.
Apple's WebObjects was originally an Objective-C platform before it was ported to Java. A sub-project of GNUStep, called GNUStepWeb, aims to be compatible with WebObjects 4.5---the last version to support Objective-C (released in 2000). I'm not sure how complete the implementation is, but there hasn't been much development in over a year.
Apple used to (and still partly does) build their web stuff using WebObjects, which ports the MVC structure and many design patterns of Cocoa apps to a Java-based web-server framework. I recently saw that someone is trying to create a server-side framework with Obj-J called Womble. Looks quite raw still, though. Either way, I'm not aware of a pure Obj-C web-framework implementation...
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
From time to time you come across some interesting code or programming challenges,
such as the ones in Project Euler, some job interview challenges like greplin, or any of the other script challenges that are posted here.
All these require some fast, agile programming language with some kind of quick way to see the results, preferably command line. There's no need to worry about readability of the code or such. You just need an answer, and fast.
What is a good language to solve these challenges? What is the best hands-on method for solving, if you have to choose a language and learn it from the start?
Project Euler tells you that lots of languages are suitable. Those problems are solved in every language from Perl to C#.
The language you should use for challenges is either the one you know best or the one you're trying to learn right now.
If you mean fast coding, rather than fast execution, I suggest looking at Python. It's very high level (thus, you can code powerful things quickly) and has an interactive mode that lets you see results immediately, which sounds like what you're looking for.
Reading your description:
You just need an answer, and fast.
I assume you are talking about runtime. If this is the case, C++ is the way to go.
However if you just started programming and you need to learn the basics, I would suggest Python.
You need an answer and fast
Only if that is the way you find programming acceptable.
Or if you intend to not gain experience in teamplay programming.
You can't fool yourself :/
I just gave this advice to a similar question for a game development language choice:
1) What is my goal?
2) What engine is going to help me , or framework, platform, what are you depending on?
3) What languages can I use to accomadate step one and respect step 2
Basically what you can do is skip step 2 really.
And it's really about what YOU want. If you REALLY want to spend a lot of time working to quick results ( Which I can respect, I'm not trying to sound all-in attack mode here), you should consider C++. It allows you to dig deep, but it can be quick , even sloppy, if need be. But you do need a little XP in it.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
So I have a project - which I guess can be considered a relatively 'large-ish' project, that I want to build.
However, I am completely new to Rails. I am intimately familiar with UX & front-end development, but dealing with the back-end is new to me. I really want to learn though, and I remember DHH famously saying that the best way to learn is just to do it.
However, I was recently speaking to an experienced Rails developer and he said it might be better to build smaller projects - so I can learn in shorter durations and not get discouraged. Then I spoke to another experienced Rails developer and he said that there is something to be said about jumping in the deep end.
So what do you guys think? What are the pros and cons of both?
Jumping in at the deep end is fine if you know enough to plan your project carefully. If you don't know anything about MVC architecture, you will probably have a really hard time planning out the database and program elements you need to get from point A to Z.
Properly planned, you can do a project by creating successive (fully functional) iterations with each one a step toward completely fulfilling your requirements. For example, with a blog you could first build a system for entering posts into your DB, then build a display function, then build tagging, then build commenting, etc.
If you don't know anything about Rails and don't know MVC, then at least a couple of tutorial level projects will be real helpful for getting you familiar with the environment and the architecture concept.
Honestly it's a different answer for everyone. Which do you think would benefit you most? If you think you would be too overwhelmed by a large project then start small and continue when you feel comfortable.
What would I do? I'd jump straight in. No matter which you choose to do your larger project is likely to contain more tasks, issues, and ultimately a lot of troubleshooting. That's a good thing, though.
The nice thing about using Rails is that it's fairly easy to build all of your models and database elements with all of its generators. Then you can simply copy any view or controller logic you've already implemented.
Some time ago, a smart developer told me to avoid "analysis paralysis" and to start designing my solution as soon as I could. In my experience I've learned that every large project could be divided in smaller ones. Rails, and all the frameworks built like it, are good on both concept:
- it helps you in designing a solution by dividing Data, Business Logic and Presentation.
- it helps you in passing from idea to code
- it has some convention that could shorten your learning curve
- it's good for DRY coding
So since you already have a project go with it. If you can find another crazy developer that is willing to help you, you'll discover that rails is good also for teams and at the same time you'll learn how nice is to work together, share ideas and discuss.
So... Time to go, type at your prompt:
rails new my-largish-cool-project