14 ms·
The worst of the two worlds: Excel meets Outlook
- richx 6y agoI love VBA, it’s so easy and powerful. My first job was being a developer/consultant at a big 4 firm, developing a disclosure management software with VB6. It even had a ORM to map objects from SQL queries. It was lightning fast, Office integration so superb. Later it was ported to .NET with a proper client/server architecture, still it never reached the speed and simplicity of the VB6 version.
- foepys 6y agoPeople are downvoting you but are overlooking the fact that it's not always about making things in the newest tech but more often than not about making things work. Most software will only be seen by industry specific users that don't care that the program is React Native and runs on AWS. A simple VBA script is sometimes completely sufficient to input the data into a spreadsheet. Scott Hanselman called devs doing this "Dark Matter Developers" [1]. 32bit VB6 programs are still able to run on modern Windows 10 machines, even on x64. The hours that would've been lost on porting everything to the newest macOS can be spent on new features or customer wishes. With the .NET Framework it's even possible to seamlessly use VB and .NET in the same program which combines old and modern technology. It's officially unsupported but it works and even gets bugfixes sometimes. 1: https://www.hanselman.com/blog/dark-matter-developers-the-unseen-99 https://www.hanselman.com/blog/dark-matter-developers-the-un...
- bgroat 6y agoI don't want to say "anti-pattern" because that's not what I mean... But new tech should be the last resort. If nothing stable, decades old, and well documented can solve the problem then reach for hot new-ness
- Retric 6y agoThat’s a little far, old doesn’t mean good. The bleeding edge often gets abandoned, but tech has generally been improving over time. IMO, the sweet spot starts when something was a fad ~5 years ago and is still reasonably popular.
- DaiPlusPlus 6y ago> IMO, the sweet spot starts when something was a fad ~5 years ago and is still reasonably popular. That would mean it's okay to use Angular today, but dev trends (and Google's support "policy") would advise against that.
- yen223 6y agoA good reason to wait a few years is precisely so that we have a clearer picture of what strengths and deficiencies a piece of tech brings to the table, especially out in the real world. We have a good picture of how Angular and React works in production now. We cannot say the same for something like Svelte.
- fpoling 6y agoReact is far from being stable. It deprecated a lot older API, added entirely new concept of hooks. If one wants stability, then PHP has a way better track record.
- scrollaway 6y agoNonsense. React is extremely stable. It indeed added hooks, deprecating exactly nothing in doing so. React deprecations are very few and far between.
- DaiPlusPlus 6y ago> deprecating exactly nothing in doing so De jure deprecation, correct - but reading between the lines in Facebook's own blog article that introduced Hooks ( https://reactjs.org/docs/hooks-intro.html https://reactjs.org/docs/hooks-intro.html ), which put a bit too much emphasis on "There are no plans to remove classes from React.", which to me means they're definitely going to be deprecating class-based controls in the future.
- nicoburns 6y ago> If nothing stable, decades old, and well documented can solve the problem then reach for hot new-ness I think it's a little more nuanced than that. Usually the older technology is more stable and better documented. But not always. Sometimes the new hotness is the new hotness precisely because it's better in these kind of categories.
- bgroat 6y agoYou and Retric are right. I'm imagining a checklist of: - Stable - Well Documented - Age In descending order of importance. When choosing between any technology choose the one that is most stable. If multiple options are on a stable release, choose the one that is best documented. If multiple stable releases have excellent documentation, choose whichever is oldest. I don't think this framework is always (or even often) right. But it works for me
- makapuf 6y agoMy checklist would be (I'm eager to know other people correct me) suitable (does it some my needs) , stable, available (including documentation, live q&a resources like stackoverflow, blog posts explaining how- not new ones but existing and up to date regarding the version available), and simple.
- josephg 6y agoI try to adapt my checklist to the problem at hand. Sometimes I'm making something as a hobby project, or to solve a problem right now. Sometimes I want to write code that will outlive me, and sometimes I'll just throw some code at the wall and call it done. Each situation necessarily results in different priorities and tools. I wouldn't TDD a gamejam project, and I wouldn't start a multi-year project in zig - at least, not yet. For infrastructure projects I want well written deps which are simple, easy to use and have good documentation. When I'm evaluating something I often read bits of its source code (eg to figure out how to do something not listed in the examples). You get a sense of where to put things that way - actix (the actor library, not the web library) is very carefully designed, but seems to go a bit overboard inventing new concepts (+ associated traits). Tide feels pragmatic - its a bit sloppy with allocations, but it doesn't seem to really care. It wants to be fast enough and good enough while being simple to use. For hobby projects I like to follow my nose and pick whatever seems shiny. Over the last few years I've learned svelte, typescript, snowpack, rust (and some rust libraries), zig, wasm and other stuff. I like to make some risky bets and then just play the hand out and see what happens. And I use that as fuel for when I make longer term projects. I'm making a little database at the moment and I'm using rust - which is much slower for me to write (compared to nodejs) but it matches the values of the project I'm working on to a tee.
- mattmanser 6y agoThe MVC and ORM revolutions are the counter-argument to this. Rails/Django, then ASP.Net MVC/Laravel/whatever Java was was a massive step forward. If you didn't use it, you were hamstringing yourself. People switched to Rails in droves. As were using ORMs. You'll still get people quibble about this, but never having to go through the tedium of updating 101+ SQL statements when you add a column in a pain you young'uns will never know... JQuery was actually another example. Cross browser Ajax statements were annoying, plus just manually adding individual HTML nodes in HTML was laborious.
- valenterry 6y agoORMs are not the only way to avoid/solve the problem of having to update many SQL statements. People complain rightfully about them.
- pjmlp 6y agoI have not seen people switching to rails in droves over here, it was a fashion wave that came and went. Apparently they are all now learning Elixir after a short migration wave over to Clojure. C++, Java and ASP.NET over here for the last 20 years.
- smitty1e 6y agoI've never ever tried VBA.Net. But my private NVBC (NecroVisualBasiCon) repo has some great stylings that I tap into at least once a year. Nevertheless, when are they going to relase Office with Python bindings included?
- JJMcJ 6y agoNot exactly Python bindings but there is a package called Xlwings that provides a Python<->Excel interface. Somewhat clunky and slow but it does work.
- jussij 6y agoOne minor correction which is there is no such thing as VBA.Net. There are basically three VB ecosystems. Visual Basic which many refer to as VB6 and it represents the last version every released. VBA which is Visual Basic for Application and lives on to this day as an embedded language for Microsoft products like, Word, Excel, Outlook etc. VB.Net which is an implementation of the Visual Basic language running on the .Net Framework.
- tonyedgecombe 6y agoThere was also VBScript, one of the two active scripting engines shipped with Windows and available from IE and WSH.
- sokoloff 6y agoMy frustration with VBA is that it didn’t seem very well documented. If I could record a macro that was “close” and examine it, the ecosystem was very productive. Once I wanted to go beyond that, it seemed like there was an undocumented chasm to cross.
- Pasorrijer 6y agoThis has gotten a lot better with the internet. Almost everything in VBA can be found with a simple Google search, and Microsoft's technical documentation online has gotten very good.
- kgwgk 6y agoIn the dark offline ages there were also those things called "books" :-) https://www.oreilly.com/library/view/vb-vba/1565923588/ https://www.oreilly.com/library/view/vb-vba/1565923588/
- sokoloff 6y agoIt wasn’t the VB part of VBA that wasn’t well documented, but rather the “for A” part that was spotty. The application automation model wasn’t as thoroughly documented as most of Microsoft’s stuff. This was well after the Internet was seriously prevalent. Things like destroying [iff present] and recreating Excel charts from scratch, including generating all the series labels, shapes, etc., updating elements in a word doc from an excel sheet, generating on-slide progress indicators in PowerPoint.
- kgwgk 6y agoThat’s true. But the ability to record macros, as you mentioned, and the object browser alleviate the problem at least in part.
- dccoolgai 6y ago20 years later it seems I spend months fighting overwrought frameworks like Webpack and React to get the equivalent productivity I could get in one day with VBA.
- airstrike 6y agoVBA is great for many things but it has its flaws. The biggest problem with it is really that the tooling around it is decades old so it hurts your productivity. Maintaining VBA code bases is a painful experience, the IDE sucks and the language has enough quirks and shortcomings that it forces you to take long detours to accomplish what would be very simple tasks in more modern languages The loving part of VBA is its interoperability across the Office suite, but there's no reason why that couldn't be done in, say, Python Oh, I almost forgot. VBA classes are absolute misery.
- ddingus 6y agoThis is the part which saves crazy time: The loving part of VBA is its interoperability across the Office suite, but there's no reason why that couldn't be done in, say, Python I agree with you, but Python and pretty much every code environment is missing a few things that create a pretty high barrier to entry: For a whole lot of cases, VBA is not even needed. People put data into cells, operate on it with formulas in other cells that drop output into still other cells which are then used to get output. Input can be almost anything these days. Formulas have a well defined, easy to understand syntax that work across a wide variety of operators. Simple copy / paste operations make sense, often with the intended data mapped right in. (given people are a little organized) Output can be almost anything these days too. And it's live. Make a change, see it happen. That's real power! People don't have to know much to make it all work either. I have been using Excel to transform business data for years, model business and a lot of other things, and as a rapid prototype system. I can write code too. Often I do, but the more specific and or variable the task is, like a one off need to solve yesterday, the more attractive just banging it out in Excel becomes. Should one get super crazy, have one of those outputs from Excel be a working program. No joke. A script file is one of my favorite outputs. Mash the data up in Excel, and once the plan of attack is clear, execute the script and watch it run on the real system. Check this thing out: https://github.com/tilleul/apple2/tree/master/tools/6502_assembler https://github.com/tilleul/apple2/tree/master/tools/6502_ass... It's a perfectly usable, and I would suggest one of the easiest, assemblers I've ever seen! I ran it on my mobile. Crazy. I just used it to knock out a little routine for a retro-game project I'm working on and was kind of stunned at how lean, accessible, functional this really is. For Clarity: Replacing VBA with something else costs more than the value add at present, and it's because Excel is the gateway drug into VBA. By the time people reach for VBA, they already are familiar with a lot of it.
- mooreds 6y agoI thought this was a great examination of unintended consequences and a problematic (or unevolved) security model. I am sure it was useful to allow Excel to manipulate other Office programs, but in a networked world the surprise applications of this are dangerous. I mean, being able to search for "password" in emails from Excel? What could go wrong?
- anonymfus 6y agoAs with other Office applications, if internet originated document contains VBA code, Excel opens it in read-only mode with disabled code execution and displays warning. > I am sure it was useful to allow Excel to manipulate other Office programs Your understanding is backwards. Other Office programs are not special, Excel can manipulate absolutely anything as VBA has a complete access to full Win32 API, that Outlook.Application is a COM object that can be accessed by any other Windows application including VBScript and PowerShell in about the same way.
- mooreds 6y agoThanks for the clarification about how Excel is manipulating Outlook.
- andylynch 6y agoWorth adding Excel’s default .xlsx format won’t even save macros. And as Raymond Chen would say, if you have macro execution you’re already on the other side of the airlock. Being able to P/Invoke from VBA is really handy too!
- known 6y ago"Everything should be made as simple as possible, but not simpler" --Albert Einstein (b. 1879) Excel is an good example;
- Pasorrijer 6y agoI think the biggest thing a lot of developers miss with the bashing of Excel and VBA is just the simplicity to the end user. As a consultant, a lot of time the solution has to be able to be given to anyone, on computers with no admin rights or installation privileges, and just work with no other dependencies, installation or special skills required. Very, very few other methods meet that requirement as well as a plain old Excel file.
- angry_octet 6y agoI've been stuck in an Excel only situation and it was extremely unproductive, and I knew with certainty that going past a very low complexity threshold would make my code 'write only', subject to bitrot when it would eventually be thrown away to be replaced with yet another spreadsheet. Although spreadsheets are not great computational models for many tasks, they can be made to get the job done. The problem is easy introduction of errors and maintenance pain -- enhanced by the fact that 'anyone can do it's means no one owns solving the problem and staffing it someone with coding skills. It's like leaving basic toolboxes around the office and saying 'no we don't use electricians/plumbers/carpenters, too much overhead, just DIY'. So yes, consultants often get the job done with Excel+VBA, a few Access DBs etc. Sometimes it is self-maintainable. The fact that Excel can get the job done (and comes with inbuilt software updates and budget) makes it easy for IT. But it is doing business critical work, using it is only papering over capability gaps.
- csydas 6y agoI think such situations are really something that needs to be felt out -- I'm not really a programmer, but I know how to code, and in my line of work, it's a benefit for sure. We don't develop projects for external or internal clients, but there are times when being able to punch things out in lowest-common-denominator programs/languages is really handy, and the idea of long-term maintenance isn't really a factor in such decisions. It's all about the problem-set you're working with; the problems I come across are either: 1. Time-consuming but rare tasks that require a pretty intimate understanding our product's code; one-off solutions in various lowest-common-denominator languages are fine, even if they need to be updated eventually because typically the problem is not so common. 2. Simple, static, non-changing tasks that can have one well developed script from the beginning and the only "maintenance" is QOL maintenance. When these are the problem sets you're working with, the burden of knowledge typically is not so heavy to transfer. They aren't urgent "our company/workflow dies if this sheet/script fails", so there is time for someone to explore and learn. I get a lot of interns that have never touched code in their life that cut their teeth on little projects like this, and in the event that we don't have someone interested in such things, even then someone still picks it up, just not on an ideal timeline. I do get what you're saying on the 'anyone can do it' problem basically just becoming a warped version of a prisoner's dilemma where the end result is no one does anything, but at the same time taking control and mastering such workflows and lowest common denominator languages helps inspire and grow people. Powershell is great for this (and I really don't like powershell), and Excel does similar things with the mind especially once you hit the limits of what is built into the UI and start looking at scripting as a solution. Excel, Powershell, and other such things are burdensome and have many rough edges to cut on; but they are extremely empowering for basically every user, and often a gateway to showing some people a skillset they never realized they had.
- tempodox 6y agoOn Error Resume Next The pinnacle of error handling!
- edoceo 6y agoWhen I did VB (loads of it!) my handler was was always labeled "hell". On Error Goto Hell
- corry 6y agoExcel elicits some equivalent of Stages of Grief in technical people. First, some version “it’s so dumb the world runs this way, I’ll just port a few of <use case> into a modern CRUD web app and people will prefer it since it will reduce errors and be in the cloud”. Then, “oh hmmm the flexibility Excel brings to the user is really hard to replicate in my CRUD app. But I’ll try.”. Then despair - “arrrg if only these dumb users would realize that the flexibility and power of Excel lead to lots of problems! Use my simple CRUD app, please!!!”. Then acceptance (and awe) - “Excel is UI, a DB, and business logic all wrapped in 1 thing that everyone already knows how to use.” Not saying Excel is perfect. Lots of us have built or are building products that do a better job at specific workflows. But surely it is one of the best pieces of software we have, and if I could only use 1 piece of software forever, it’s probably Excel.
- kqvamxurcagg 6y agoYou hit the nail right on the head there.
- droopyEyelids 6y agoFeels like he's confusing "Excel" for "spreadsheet program with scripting abilities"
- tylerrobinson 6y agoCan you think of another “spreadsheet program with scripting abilities” that is already installed on every business computer on the planet?
- gbear605 6y agoGoogle Sheets is for the many companies that use Google. It’s definitely not ubiquitous, but then Excel isn’t either (my company only has a few Excel licenses for the people who are customer facing, everyone else gets Google Sheets).
- ddingus 6y ago
- snomad 6y agoBTW, they do have a JS API. Been using it a lot recently, fairly easy and straightforward https://docs.microsoft.com/en-us/office/dev/add-ins/develop/understanding-the-javascript-api-for-office https://docs.microsoft.com/en-us/office/dev/add-ins/develop/...
- blendo 6y agoCan the js code be deployed in the same .xlsx file as the spreadsheet? Still, I’m disappointed MS didn’t implement a typesafe lang such as C# or F#.
- andylynch 6y agoOffice JS is about writing addins, rather than macros. You have been able to do the same in C# /F# for years using VSTO or Excel-DNA
- simonjgreen 6y agoThey did using m. It's been there in powerquery for maybe 10 years now.
- smitty1e 6y ago> First of all we have to say that you can interact with Outlook directly from other Microsoft Office apps via VBA using the object Outlook.Application. I haven't seen any corporate deployments that permit jacking around directly with Outlook in years. In particular, the transition to .*x file extensions some years ago marked the a heavy lockdown of all my favorite VBA stylings. To give a customer an .xltm with the capability to import .json files with tidy formatting, it was necessary to package everything as a .docx and then construct the target on his machine. It's one way to do security, I suppose
- curiousllama 6y agoI'm convinced there are more applications written in VBA/excel than any other single language/IDE.
- cateye 6y agoWhat surprised me the most is that most developers can't actually use Excel properly. Most developers struggle even with really basic Excel operations while a lot of non-programmers can do advanced and useful things with it. For exampe: We used it once as a bug tracking tool and all business people could easily work with it while developers didn't understand that they should use the drop-downs in the cells to define the status and not type something in the cell. We had to continously fix the sheet and explain the developers. While they were complaining about Excel,it was obvious that the lack of basic knowledge of how to use it properly was just lacking. The same is true even to a greater extent for Word processors. Only a small part of the users can properly format a document with a correct usage of headings and sections.
- kh1 6y agoTrue. The problem is people share the bug tracking spreadsheet over email, and you have to find out the latest version from inbox. I still don't know what the best solution could be for both business people and IT people. For word documents, I write in markdown and check in to git which allows me to compare the difference, etc. And I use pandoc when I distribute it as a proper document.
- higerordermap 6y agoA shared Google sheet works well for most people.
- jasdine817 6y agoPeople do this in my company even despite us having SharePoint which has decent enough support for collaborative capabilities and should in theory get rid of any need for different document versions, but that escapes many people.
- aksss 6y agoThis seems like a conversation from 2010. I'm not saying that to insult, but it's literally the kind of conversation I was having in a corporate environment 10+ years ago. Now, why can't you just share the link to the Excel spreadsheet and work collaboratively on the same document? If it's stored in SharePoint or OneDrive, this is trivial. There's a "Share" button in the top right corner, and you can do it from Windows Explorer as well. There's little value in emailing versions around anymore, particularly internally.
- diveanon 6y agoA key stakeholder of our product is constantly pushing us to make our ui more excel like. As a product we are happy to oblige, but the cynic in me just wonders why they don't just use excel and close the loop on their csv import / export workflow
- unnouinceput 6y agoDo not give them ideas, on the contrary, give'em more rope. And when the time comes and they come with the idea themselves present yourself as the unique person that can do the migration to Excel, since meanwhile the codebase would be in millions of lines of code and you're the only one left to understand it. And that's your moment to ask for the big bucks as a contractor. Always remember the golden rule of life: stupidity and intelligence must be paid (their stupidity and hopefully your intelligence).
- diveanon 6y agoThis accurately summarizes our current roadmap with this customer.
- pototo666 6y agoLike many incumbent thing with network effect in the world, excel is both terrible and useful. But that is the beauty of software industry. You don't have to be perfect to win. You need to be faster, better and cheaper than current solution. For the moment, the faster and better solution than Excel might not be cheaper. So we are stuck with Excel, until someday someone really comes up with a faster, better and cheaper solution.
- SiebenHeaven 6y agoSo ... Microsoft has a a threat modelling tool. Wonder if it existed and used when these designs were made.
- berryjerry 6y agoI love excel but it feels like it's UI based abilities have been left in the dust. It's like development of excel and VBA stopped and even reversed to make things function worse. A few new features, forms, buttons, etc. would be a god send for more complex systems.
- aksss 6y agoWell, god sent us the xlookup function, to replace vlookup and hlookup. Honestly appreciate that change more than any other excel-specific change.
- gbil 6y ago>so we enable the load and execution of macros by changing the value to 1 This I believe will be a short-lived hack in a properly setup enterprise environment with proper GPOs in place. Saying that my eyes have seen a lot and especially if you leave it up to the users, they'll click their way through any warning messages so...
- durnygbur 6y ago> Excel meets Outlook Both over web apps, locked to work on Edge on Windows 10 by a corporate policy. Screw you for violating mental health of generations of IT people, Microsoft.
- nexthash 6y agoThis is unreal... I thought these kinds of things would've been fixed in 2000 with the ILOVEYOU virus [1]. But apparently Excel VBA allows you to manipulate the registry, access Windows APIs, drop files onto the system, and manipulate/access Outlook to run macros across all of your mail and more. Does Microsoft really expect the average office worker to not fall for an urgent-looking, highly-realistic spreadsheet asking him to enable everything? If this is really what I think this is it's an obvious security disaster for the whole Windows ecosystem. [1] https://en.wikipedia.org/wiki/ILOVEYOU https://en.wikipedia.org/wiki/ILOVEYOU
- unnouinceput 6y agoIt's a tool, and as any tool can be use for good or bad things. I don't hear you whining about Chrome/Firefox/whatever extensions written in C++/JavaScript/whatever that can be keyloggers too.