« first day (1785 days earlier)      last day (1395 days later) » 
00:00 - 18:0018:00 - 00:00

12:01 AM
RELOAD!
[rubberduck-vba/Rubberduck] 1 opened issue. 12 issue comments.
[Zomis/minesweeper-core] 3 commits. 7 additions. 4 deletions.
[Zomis/minesweeper-server] 1 commit. 414 additions. 812 deletions.
[Minesweeper] Games Played: 125, Bombs Used: 74, Moves Performed: 17531, New Users: 15
 
 
1 hour later…
1:51 AM
user image
2
Yep. good thing I don't do twitter. I'd only help fan the flames.
 
2:23 AM
@IvenBach LOL
 
@IvenBach You speak as if twitter exist for other purposes other than flamebaits....
 
#VBAisOOP
 
See, that's totally what RD's twitter should be tagging
 
KnowThyself
I do and that's why I don't expose myself publicly on Twitter or most other social media places.
It's time to sit down and have a go at hyperlinks in AvalonEdit.
 
3:09 AM
> **Justification**

VBA is very forgiving in terms of implicit type conversions. Late-bound member calls move glaring compile-time errors from compile-time to run-time; variables don't even need a declared type! VB.NET addressed these loose ends with `Option Strict`, and I think we have everything we need to make VBA do the same.

**Description**

Microsoft Docs describes `Option Strict` as follows:

> **Option Strict Statement**
> Restricts implicit data type conversions to only wid
 
@Duga How do we allow for object conversion?
 
how does VB.NET allow for object conversion?
 
Dim x As Foo
Dim y As Bar

Set x = New Foo
Set y = x 'Maybe?
Haven't done VB.NET but I think you can do Set y = x As Bar
 
I'd think explicit casts are allowed
 
that's my point. there is no explicit cast in VBA.
for object types, at least.
 
3:15 AM
@this that's how we cast in VBA
 
Yes but I always thought of it as implicit
 
well, as far as '@OptionStrict goes, we can consider them explicit :)
(converting to VB.NET will entail making these casts actually explicit)
 
would love to see compile inspection-time validation that the castings are valid, though. Maybe one day....
</thinkingbig>
 
lol I was typing the issue and wondering if there was a way we could hook the compiler and make it think it ran into a compile error
 
this is particularly a problem - 3580
well it'd be down to hooking to the notification that a compile was requested, I guess. Would make RD 1000% awesome if it can start throwing compile-time errors.
 
3:21 AM
yeah. ...otoh, at least with inspections you get to see them all at once :)
 
but see - if you can hook into that notifcation, you can suppress that default compile warning
and instead emit them to the toolwindow somewhere
 
CompileErrorResult : IInspectionResult
 
Rubberduck - the Visual Studio for Applications Edition™®
 
=)
hmm, I think if all object type casts are going to trigger an inspection result, we might want to have a '@DirectCast annotation as a surrogate of '@Ignore ImplicitObjectTypeCast
Dim x As Foo
Dim y As Bar

Set x = New Foo
'@DirectCast
Set y = x 'no inspection result
 
if we allow it to do some analysis, it should be able to see that x at the time of the assignment is going to be statically Foo, and we can then determine whether a Foo implements Bar's interface.
That wouldn't be a cheap analysis, though.
e.g. Set sht = Worksheets(SomeVariable) <= returns an Object, but we're casting to Excel.Worksheet implicitly.
 
3:34 AM
I always to that
any member call chained to that is late-bound and I hate it
 
^
and that's where bugs creep in
 
#TIL DirectCast is literally (string)foo
 
in VB.NET?
 
yeah
wtf how do you cast in VB.NET
 
(first hit on google, me lazy)
seems it uses DirectCast() and TryCast()
 
3:37 AM
ok I totally misread the SO answer lol
 
and tbh, I hate that syntax already
 
so yeah '@DirectCast
 
I do not like how VB-derived languages makes everything a function, especially without an object
 
^
'@DirectCast(x, Bar)
Set y = x 'no inspection result
the annotation could serve as a .NET conversion tool lol
 
yeah
 
3:40 AM
kinda
 
better than that one MSFT shipped back in 2007
that one was a hatchet job
 
> Idea: a @DirectCast annotation as a surrogate to @Ignore ImplicitObjectTypeCast
 
I like how '@DirectCast has value as a good "why" comment, too
#CureVBA
come to think of it, ...with an @OptionStrict annotation we might actually get to have IT departments force Rubberduck to be installed on VBA devs' machines.
(especially with a compiler hook, but eh)
 
3:57 AM
if (foo)
    bar();
^ Does R# have an option to explicitly add { ... } around singe line ifs?
if (foo)
{
    bar();
}
 
select the line
"surround with"
 
Is there a way to add that to Ctrl+.?
 
Ctrl+E,U
 
And how, pray tell, did you figure that out? Clearly reading the manual? Link so I can educate meself?
 
4:02 AM
I'm just proud of myself for asking the correct question.
 
@IvenBach I use "surround with" (try) rather often, ...had to google for the keyboard shortcut though
 
ReSharper>Edit>Surround With Template… was the breadcrumb I was looking for.
 
> VBA doesn't have an explicit cast operator: a new `@DirectCast` annotation could be used to decorate assignments that would otherwise trip implicit object type conversions (linking #3580):

```vb
Dim a As Foo
Set a = New Foo
Dim b As Bar
'@DirectCast
Set b = a
```
 
I'm a sucker for hotkeys.
Neato. Fix floating-point comparison is cool.
 
how is it fixed?
hopefully by slapping you with a cold fish and tell you to stop using floating point data types? :D
 
4:11 AM
Originally: t.X != pos.X
Refactor: Math.Abs(t.X - pos.X) > TOLERANCE
 
still think it needs some cold fish slapping
 
but yeah, epilson is marginally better than the original naive comparison
 
Going through AvalonEdit example with R# and fixing all the suggestions I understand.
 
:+1:
 
4:14 AM
I've learned a lot since last using R#.
Still so much to learn though...
 
@JorgeFernándezHidalgo Welcome to the pond.
 
5:13 AM
@JorgeFernándezHidalgo ditto from Australia
 
 
1 hour later…
6:28 AM
I appreciate var pattern matching, ?: and several other .NET language constructs a lot more after going through those edits.
I'm past fatigued. No clue why I did those edits. #TunnelVisioned and #NerdSniped by R#'s features is my best guess</iven>
 
 
4 hours later…
10:46 AM
I get the point, but doing this:
Private Sub ExportSourceFiles(ByVal destPath As String)

  Dim localPath As String
  If Right$(destPath, 1) <> "\" Then
    localPath = destPath & "\"
  Else
    localPath = destPath
  End If
just to avoid an RD 'ByVal parameter is assigned a value" (or whatever the exact wording is) inspection (and the general hand-slappyness of doing it that way) is really kinda annoying.
 
then don't?
I mean... RD is just offering an opinion for a lot of inspections
it's an informed opinion, but it's still an opinion
 
That informed opinion is based on generally accepted "best practices" though, isn't it?
I hate that phrase whenever the management types start throwing it around
 
in this specific case: not really
there is some point to not reassigning parameters, but the benefit is only marginal...
 
Mug's version of that answer is much easier to type: #ItDepends :)
Again, I'm working on mostly 30+-year-old programming theory, so I'm trying to learn the new tricks.
 
I mean... it's not like VBA has a const keyword that allows you to mark a param as immutable and allows the compiler to optimize around that
for different languages, not reassigning parameters can allow the compiler to perform different optimizations like instruction reordering and pipelining
but for VBA .... not so much
mostly because you cannot mark a variable as constant, which means the compiler would need to determine that through the whole callgraph... and that's basically impossible
 
10:58 AM
hrm... didn't know about that. Really do need to start digging into my C# learning. I guess some of these things will make more sense when I understand the why, as you've just described.
 
It's not C#, I'm specifically thinking about C++, but there's other languages out there that use similar things
 
well, C# is more modern than VBA (As is just about everything), so that's my standard for "modern/new". :)
Maybe I'll start implementing '@Ignore ... annotations for that one. Good to leave the inspection enabled to make sure I'm thinking about each one, but knowing there's somewhat limited value in jumping through that hoop, I'll apply the SlowFix™ more judiciously.
Thanks! #NewNugget
Mini code review:
  Dim thing As AccessObject
  For Each thing In CurrentProject.AllForms
    Access.Application.SaveAsText acForm, thing.Name, localPath & thing.Name & ".frm"
  Next

  Dim component As VBComponent
  For Each thing In CurrentProject.AllModules
    Set component = Application.VBE.ActiveVBProject.VBComponents(thing.Name)
    Access.Application.SaveAsText acModule, thing.Name, localPath & thing.Name & ToFileExtension(component.Type)
  Next

  For Each thing In CurrentProject.AllReports
    Access.Application.SaveAsText acReport, thing.Name, localPath & thing.Name & ".rpt"
Is thing an acceptable reasonable name? #NamingIsHard
I could go with accessCodeModuleThingy...
Observation for the day: Normally, Form follows Function
 
11:19 AM
@FreeMan for a local throwaway variable, I usually don't have a problem using short names - typically ao in this case. This only work if I only have one variable of that type in the method, obviously.
@FreeMan note that acFunction and a number of others are actually artifacts from ADP file format. You will never see those in a MDB/ACCDB file format.
In general, you only care about acTable*, acTableDataMacro, acQuery*, acForm, acReport, acMacro (!), and acModule. *Keep in mind those 2 are useless for the LoadFromText/SaveAsText since they aren't "code" objects.
 
@this #JokeFail
 
..... doh!
 
:)
 
#NeedMoarCaffeine
 
#2ndCup
 
11:23 AM
#WaitingOnWaterBoiling
#ZeroCup
 
@this so thing seems reasonable, as it's at least almost as descriptive as ao.
@this acTable and acQuery are in the DAO castle, IIRC.
I'm getting tired of all these princesses and their castles. They need to start pulling their weight instead of just sitting around waiting to be discovered and rescued.
wait, you make coffee by boiling water? How does that work? Doesn't modern technology take care of all that stuff for you?
You're not some sort of coffee-hipster are you?
 
@FreeMan I suppose so. If you really wanted to be descriptive, it'd probably be currentOject or something like that. It irritates me only a bit because the thing is too far away from the AccessObject but that's strictly me being inconsistent.
 
#InconsistencyFTW
 
@FreeMan Ah, you made a fatal blunder. You assumed I drink coffee brown swill water.
 
tea? shudder
 
11:28 AM
Yeah
I long ago pledged my fealty to Earl Grey, you see.
 
Green tea at a Chinese restaurant, is about the only time I ever drink tea. Weird, I know...
I long ago pledged my fealty to Earl Grey, UK. <-- FTFY
:)
 
@FreeMan correct; you do use those for other stuff within Access' OM - like DoCmd.SelectObject for instance. So it's a thin wrapper over a DAO object, basically.
Uuuuhhh.... is there another Earl Grey?
:D
(and I'm fairly certain that the murica don't do this nobility thing)
 
Lemme get the "real" code bits into git & then get my major new project under way. Then at some point In The Future™ I'll consider trying to export/import the queries.
#JokeFail... "you see" -> "UC" -> "UK"...
It ain't funny if you have to explain it
 
DOH X2 COMBO!!!!
 
impatiently waits for This' water to boil
When I'm cycling through myFile = Dir(), is there a built in function like extension = FileExtension(myFile) or is that a roll your own?
I've not found anything in MSDOCS, but my doc-google-fu aint the best...
@this BTW- that's good, bonus points for the combo, right?
 
11:40 AM
I usually just use the Scripting library
I loathe VBA's crappy I/O stuff anyway
 
Yeah, but Dir() is just there... /whine
valid point.
 
Fix reorder parameters preview

This also introduces an extension to the Accessibility enum to provide a codestring.
We're replacing the StringBuilder code with a more easily followed interpolated string as well
[rubberduck-vba/Rubberduck] Vogel612 pushed commit a1e4d487 to next: Bring RemoveParameters signature preview generation in line with ReorderParameters
Add Doc-Comment to CodeString extension

Co-Authored-By: Vogel612 <Vogel612@users.noreply.github.com>
[rubberduck-vba/Rubberduck] Vogel612 pushed commit 765f9312 to next: Rename CodeString to clearer name
Fix the reorder parameters preview generation (#4927)

Fix the reorder parameters preview generation

Co-authored-by: Mathieu Guindon <retailcoder@gmail.com>
[rubberduck-vba/Rubberduck] Vogel612 pushed 11 commits to next (only showing some of them below)
[rubberduck-vba/Rubberduck] SonGokussj4 pushed commit 374e872d to next: undo negative margin because of the WYSIWYG editor
[rubberduck-vba/Rubberduck] SonGokussj4 pushed commit a275aee4 to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into next
[rubberduck-vba/Rubberduck] SonGokussj4 pushed commit 2d1cbc2d to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into next
[rubberduck-vba/Rubberduck] SonGokussj4 pushed commit 33a24eae to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into next
[rubberduck-vba/Rubberduck] SonGokussj4 pushed commit ef6f8256 to next: 'Exclamation' resource was missing
[rubberduck-vba/Rubberduck] Vogel612 pushed commit c760d70e to next: Reinstate exclamation image as warning symbol
[rubberduck-vba/Rubberduck] Vogel612 pushed commit 6dec120d to next: Update the View when edits disrupt the validity of a HotkeySetting
Merge pull request #1 from Vogel612/xaml-updates

Fixes for upstream PR #4890
[rubberduck-vba/Rubberduck] Vogel612 pushed commit aa0f1995 to next: Fix the type-mismatch in General Settings assertions over Hotkey Settings
Fix settings headers (#4935)

Fix settings headers

Co-authored-by: SonGokussj4 <SonGokussj4@users.noreply.github.com>
 
11:56 AM
@FreeMan could be localPath = destPath & IIf(Right$(destPath, 1) <> "\", "\", vbNullString)
 
and destroy the microoptimization?!? Heavens forbid!
 
@MathieuGuindon Had I thought to use Iif it might have been... :)
 
@this How much processing time is lost by evaluation both "\" and vbNullString???
#GotTheJokePokingBack
 
One cycle? Two? Heck, I'll be generous and give you 100 cycles.
 
wastes more cycles trying compute the wall time than the code does by executing
 
It seems that executing Access.Application.LoadFromText causes Access to automatically save the project. i.e. - you'd better have a good backup in case you manage to really screw up yer code when importing...
 
Not sure you can "undo" that, so saving makes sense.
 
Not just "undo" but close the .accdb does not give you an option to close without saving. i.e. it's written directly to disk.
 
1:05 PM
that technically is "undoing", no?
 
Yes, but not in the Ctrl-z sense, which is how I took "undo"...
Interesting... this code
Private Sub ImportSourceFiles(ByVal sourcePath As String)

  Dim localPath As String
  localPath = sourcePath & IIf(Right$(sourcePath, 1) <> "\", "\", vbNullString)

  Dim FSO As FileSystemObject
  Set FSO = New FileSystemObject
  Dim file As String
  file = Dir(localPath)
  While (file <> vbNullString)
    If left$(file, 1) <> "." And file <> "DevTools.bas" Then     'ignore hidden files used for git and this module - it's not pretty
      Select Case LCase(FSO.GetExtensionName(file))
        Case "cls", "bas"
successfully hits the first Case "cls", "bas" option and executes the .LoadFromText, then it tells me that it cannot enter break mode.
My only option from there is "continue" or "abort".
haven't yet been brave enough to continue...
makes multiple backups
 
makes sense - at this point you are modifying the code.
You can't debug while you are modifying the code
 
~sighs
> 281 files changed, 2547 insertions(+), 3026 deletions(-)
^^ that's a single commit
 
if you want to monitor what it does, let me introduce you to your newest bestest ♥BFF♥.... Debug.Print
 
because I couldn't be bothered to untangle the mess around there
 
1:13 PM
RD's or work's?
 
@this I was able to step through multiple .LoadFromText statements in earlier versions of the code. Maybe because I wasn't doing it right...
 
No, I think you can freely change Access' objects but if you change code modules/classes, it has to interact with VBIDE, and VBIDE can't be debugged in that situation.
 
Ah. I think it might have worked OK when I was accessing the VBE castle. Now that I'm properly chucking them out of the Access castle windows, it's not going so swell.
Debug.Print and a pile o' backups to the rescue!
 
@this work's
 
@FreeMan the inability to continue in break mode is definitely a VBE thing. You will get the same thing if you try to modify code using VBIDE API for example.
 
1:42 PM
and, I got the RD plug in, too.
It imported everything and it compiled!
~sits down in mild shock~
 
@FreeMan nice! (assuming the star is a direct effect)
Ugh, it seems that no matter how much emails I delete, it's still a drop in the bucket and Googly's saying I still have too much. :-\
 
@this could be, but his git name and SO name are distinctly different if that's the case...
 
Still neck-and-neck...
 
I assumed (2x!) that it was a reader of the thread, not the OP
@mansellan hence why we need to accelerate our star-gathering. ;-)
I sometime wonder if they just click on the vba tag, then star the first few repo they like.
 
2:12 PM
0
Q: How to I make my code that interact with pivot table run faster? My code would change the graph color and title

PhikingI am new to VBA. I created these buttons that would only show the data that I want it to show. And on the graph, it would also change color and the chart title. This is all on the pivot table by the way. ActiveSheet.ChartObjects("Chart 1").Chart.ChartTitle.Text = SField & " Revenue" ActiveSheet....

 
@QuackExchange Woah, woah, slow down, mister! Let's not put Speedy Gonzales to shame!!
 
2:27 PM
@QuackExchange I'm just glad he didn't kill our eyes by posting the duplicate methods
 
2:49 PM
I wonder what's going to happen to the universe now that all the Avengers are either dead or retired?
Now the next villain can just take over!
 
3:03 PM
Spoilers!
#Don'tCare
Many of your issues were already covered in this answer. — FreeMan 9 secs ago
@MathieuGuindon ^
@this There is this:
@FreeMan great recommendation, I didn't know that, I'll use it definitely as I already can see that I'll benefit from using it (avoid newbie mistakes). Regarding Left and Left$, both work, the other 2 suggestions didn't work (some issue with object as well). I'm very very grateful for your time and help — Martim On Fire 52 mins ago
His user name makes me wonder, is he on fire, or is he writing/speaking/musing about fire...
 
@FreeMan doesn't matter. They keep retroconning everything anyway.
how many times Superman has died?
Far too many times, for sure.
 
lol they're mildly entertaining movies (those I've seen, anyway), but I've never been a comic book person.
And of course they retcon it all, how the heck else would they come up with more movies?
 
ding ding!
I don't think movies is that much different from comics in terms of continuity, anyway. (if it's even a thing)
 
as a fan of Doctor Who, I can't complain about retcons. Of course, Doctor Who doesn't have an official canon for them to retcon, so it doesn't matter
 
3:19 PM
TBH, I can't follow DW exactly because there's no continuity and the deux ex machina get invoked too much for my tastes.
 
3:34 PM
@this coincidentally a YT comment got a like at around the same time
 
Ha! I saw "DW" but for some reason read Castle Windsor and was really confused!
 
Did I mention I need to start making these YT videos?
2
I need to start making these YT videos
 
There's usually a general, overall story arc to each Neu Who season, but in general there's no continuity. You'll get that with time travel...
 
@MathieuGuindon not enough, apparently.
@FreeMan I grant that time travel can play havoc but that's only more reason to be more rigorous in how you write the story. As an example of what I consider good time-traveling story, I refer you to the [Adventures of Dr. McNinja's later books](drmcninja.com).
hmph. #LinkFailure
FFS
 
3:43 PM
#FML
 
3:56 PM
Friday My Life?
I was doin' good this morning. Now, I've just run outta steam. It isn't even technically after noon...
I have been working since 6am, though.
 
4:07 PM
@QuackExchange VTC'd/lack of context. needs the code, not snippets of it
 
@Feeds "I'm ROOT!"
 
and to be frank, you shouldn't hack like that. You want to just silently slip in, and just... lurk.
 
I totally read it with Groot's voice: "I AM ROOT!"
 
that'd work.
but probably best to add "but not for long...."
 
4:25 PM
@MathieuGuindon 2013. I know it's not macro enabled but I have read that you can save macro code in .dot templates anyway — Syntax Error 16 secs ago
I give up
 
@MathieuGuindon Stay within the walls of CodeReview. Far easier within the breakwater walls.
The swells that come in from the ocean that is SO are bad enough.
 
Some of the stuff on CR has been pretty sketchy of late, @IvenBach
 
4:43 PM
I'm guilty of helping a post or few of those.
They put effort in and I see past-Iven in that effort.
@FreeMan I've noticed your LvlUp with git. How's that been?
 
Not bad. It's been like an old fluorescent tube - there were flickers and pops, then suddenly "ah ha!" there was light.
I'm by no means a guru, but I can make it through a commit and merge on my own. I've done one push that didn't go so well and I needed a lifeline (thanks again to @Vogel612!), but I think I've remedied that issue.
It helped a lot by getting GitHub out of the picture. There was just too much to grok all at once there.
 
5:09 PM
Test explorer now has a spectacular fail...
Of course I come across it.
 
@IvenBach oh what did you do to get one of those?
 
:shrug: Ran the test. Trying to figure out where it's barfing right now.
 
rerun, maybe it's intermittent?
 
Should I look in the log?
Nope. This is me we're talking about. The spectacular error can only be consistent.
 
it should get logged there.
 
5:19 PM
Looks to be the way I have my test set up. It's not a true unit test, but rather a hack I'm claiming is a unit test.
 
did it crash or something like that?
in that case, the ducky should just bop you on head and say "cut it out, Iven"
 
'@TestMethod
Public Sub NamedRangeTable()
    On Error GoTo TestFail

    'Arrange:
    Dim tableInfo As Variant
    tableInfo = Sheet98.ListObjects("MovingNamedRanges").DataBodyRange

    'Act:

    'Assert:
    Dim checkRow As ListRow
    For Each checkRow In Sheet98.ListObjects("MovingNamedRanges").ListRows
        If Not (IsEmpty(checkRow.Range(1, 1)) Or IsEmpty(checkRow.Range(1, 3))) Then
            Dim expectedSheet As String
            expectedSheet = checkRow.Range(1, 2).Value2
            Dim expectedRange As String
It looks like the multiple evaluations of Assert.IsTrue Not hasMoved that has an argument of False is the culprit.
@IvenBach pssst! past-Iven You really should load that into memory instead of repeatedly hitting the worksheet. It'll make things more performant.
 
@IvenBach did you know that I'm a time traveler?
 
5:37 PM
You get to go back and revisit all your old code? If that's the case then I'm one too.
 
No, no, no. I literally travel through time.
In fact, I'm doing it right now.
I'm traveling into future, you see - at a rate of 1 second per second.
2
 
@FreeMan That thing about princesses reminds me of something one of the heroes said in Terry Pratchet's books.
 
Knowing that fact leaves me completely whelmed.</snark>
 
lol
 
Is there anything that would slow unit tests to crawl?
 
5:43 PM
your code?
:-p
 
@IvenBach CPU overheating?
@Hosch250 left hanging...
@IvenBach approaching the speed of light.
^ wait, is that how it works?
 
@FreeMan I don't remember exactly what it was (Hrun, I think it was? It wasn't Bravd or Conor), but I immediately thought of it when I saw it.
 
glad I could help!
 
@FreeMan I think it only works if the observer (the code) is at the rest while Iven is approaching the speed of the light.
 
@this past-Iven earned that comment with this code of his...
 
5:45 PM
From Iven's frame of reference time is moving normally.
but from the observer-at-rest's frame of reference, he took a billion years to get here.
I think.
<= not an Einstein
 
@this was gonna say I didn't have the brain cells to attempt Einsteinian physics this afternoon...
 
A brain tickle tells me there's something I've forgotten as to why these unit tests are so slow...
 
Hm, so Iven is approaching a really heavy mass of code?
 
a black hole?
 
Here's one that has always me thinking - suppose you are on a highway, and to your right, there's a train track, and the train is there. You know that the car is moving, but how do you know if the train to your right is also moving?
with other cars, you can easily tell by looking at the hubcaps.
with a train, there's no easy indicator.
 
5:50 PM
Is this a SoCal highway? Cause if so definitely nobody is moving.
3
 
lol
 
To physics, it does not matter.
 
@this hit the brakes: if it zooms past you and the car behind you honks or crashes into your rear, it was moving
 
that's kind of cheating, tho. ;-)
 
@this Well, this won't really work for you, but they make a heck of a lot of noise when they are moving.
 
5:53 PM
I'm sure. But aren't maglev trains supposed to be much more quieter?
 
Oh, inner-city trains? Yeah, they are, but they still have a kind of whooshy noise.
 
the point is more about determining whether the other vehicle is moving while you are moving yourself.
 
Well, you can tell if the other vehicle is moving if it's going faster than you :)
 
If you're moving past the train at the same rate you're moving past the other scenery, it's stationary. If the train is moving past at a different rate, then it too is moving.
 
In all actuality though, it usually takes a third reference point to compare against. Is the car moving past a tree, or building?
 
5:54 PM
That would be true. And if it's not moving at all, you'd see it approach into sight, then leave as you pass by.
 
If you were on a flat desert with no other reference points, it would be harder, but they usually also sway when they move.
 
@FreeMan perspective can throw this off, depending on the angle/distance
 
^
 
I wouldn't want to bet my life on it, because it is tricky at times, and could be set up to deliberately be trickier.
But, in most real-life situations, you can tell.
 
@Hosch250 I think the sway is harder to see when you're side to side than front to back
 
5:59 PM
If you're moving faster than the train, you'll catch and pass it, if it's moving faster than you, it'll catch and pass you. The tricky bit is if it's moving slowly - you have to judge whether it's moving at the same rate as the surrounding scenery. Even in a desert there would be some features you could use as "markers" to identify relative movement.
 
00:00 - 18:0018:00 - 00:00

« first day (1785 days earlier)      last day (1395 days later) »